diff --git a/tools/romimg/src/romimg.c b/tools/romimg/src/romimg.c index fab351f736bc..8b187a0714ab 100644 --- a/tools/romimg/src/romimg.c +++ b/tools/romimg/src/romimg.c @@ -161,7 +161,7 @@ int CreateBlankROMImg(const char *filename, ROMIMG *ROMImg) CommentLength = IMAGE_COMMENT_BASESIZE + strlen(filename) + sizeof(LocalhostName) + sizeof(UserName) + MAX_PATH; ROMImg->comment = (char *)malloc( CommentLength+1); if (!ROMImg->comment) return ENOMEM; - snprintf(ROMImg->comment, CommentLength, "%08x,conffile,%s,%s@%s/%s", ROMImg->date, filename, BUFCHK(UserName), BUFCHK(LocalhostName), cwd); + snprintf(ROMImg->comment, CommentLength, "%08x,conffile,%s,%s@%s/%s", ROMImg->date, filename, UserName, LocalhostName, cwd); // Create a blank RESET file. ROMImg->NumFiles = 1; @@ -454,7 +454,7 @@ static int AddExtInfoStat(struct FileEntry *file, unsigned char type, void *data int AddFile(ROMIMG *ROMImg, const char *path, int upperconv) { - char tbuf[10] = "\0"; // we dont need a large buf, this is for filling in the filename on ROMFS + char tbuf[9] = "\0"; // we dont need a large buf, this is for filling in the filename on ROMFS FILE *InputFile; int result; unsigned int FileDateStamp;