Skip to content

Commit e09a763

Browse files
committed
- Fixed number of bytes passed to memset()
1 parent d0e18f3 commit e09a763

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hdump.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ int main(int argc, char *argv[])
7878
if (!buff || !ascii)
7979
fatal("not enough memory\n");
8080

81-
memset(ascii, 0, sizeof(ascii));
81+
memset(ascii, 0, (sizeof(unsigned char) * cols)+1);
8282

8383
if (!(file = fopen(argv[argc-1], "rb")))
8484
fatal("file not found or not readable\n");

0 commit comments

Comments
 (0)