Skip to content

Commit d8ce025

Browse files
committed
fix romimg error
1 parent af00502 commit d8ce025

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/romimg/src/romimg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ int CreateBlankROMImg(const char *filename, ROMIMG *ROMImg)
161161
CommentLength = IMAGE_COMMENT_BASESIZE + strlen(filename) + sizeof(LocalhostName) + sizeof(UserName) + MAX_PATH;
162162
ROMImg->comment = (char *)malloc( CommentLength+1);
163163
if (!ROMImg->comment) return ENOMEM;
164-
snprintf(ROMImg->comment, CommentLength, "%08x,conffile,%s,%s@%s/%s", ROMImg->date, filename, BUFCHK(UserName), BUFCHK(LocalhostName), cwd);
164+
snprintf(ROMImg->comment, CommentLength, "%08x,conffile,%s,%s@%s/%s", ROMImg->date, filename, UserName, LocalhostName, cwd);
165165

166166
// Create a blank RESET file.
167167
ROMImg->NumFiles = 1;
@@ -454,7 +454,7 @@ static int AddExtInfoStat(struct FileEntry *file, unsigned char type, void *data
454454

455455
int AddFile(ROMIMG *ROMImg, const char *path, int upperconv)
456456
{
457-
char tbuf[10] = "\0"; // we dont need a large buf, this is for filling in the filename on ROMFS
457+
char tbuf[11] = "\0"; // we dont need a large buf, this is for filling in the filename on ROMFS
458458
FILE *InputFile;
459459
int result;
460460
unsigned int FileDateStamp;

0 commit comments

Comments
 (0)