Displaying 1 result from an estimated 1 matches for "secondssinceepoch".
2010 Oct 25
1
[LLVMdev] sprintf -> snprintf conversion
...printf(buffer, sizeof(buffer), "%-6u", mbr.getUser());
memcpy(hdr.uid,buffer,6);
- sprintf(buffer, "%-6u", mbr.getGroup());
+ snprintf(buffer, sizeof(buffer), "%-6u", mbr.getGroup());
memcpy(hdr.gid,buffer,6);
// Set the last modification date
uint64_t secondsSinceEpoch = mbr.getModTime().toEpochTime();
- sprintf(buffer,"%-12u", unsigned(secondsSinceEpoch));
+ snprintf(buffer, sizeof(buffer), "%-12u", unsigned(secondsSinceEpoch));
memcpy(hdr.date,buffer,12);
// Get rid of trailing blanks in the name
@@ -141,9 +141,9 @@
// Set the s...