【发布时间】:2012-09-11 17:11:50
【问题描述】:
为什么我的NSMutableString 可能不安全?我搜索了这个,但找不到任何东西。
int hour = [number intValue] / 3600;
NSMutableString *time = [[NSMutableString alloc] initWithString:@""];
if (hour < 9) {
[time appendFormat:@"0"];
[time appendFormat:[NSMutableString stringWithFormat:@"%d:", hour]];
}
它有什么问题?这是我第一次看到这个。
【问题讨论】:
-
我不确定你在这里问什么。如果您解释了为什么您认为此字符串“可能不安全”,将会有所帮助。
-
您搜索过这个?真的吗? Googling "objective-c potentially insecure" 为我打开了充满有用链接的第一页。您能否详细说明您收到的警告以及为什么之前的问题对您没有帮助?
标签: objective-c cocoa-touch nsmutablestring