blob: dc5fab9b5725a6cd8993748a6633abe64b24c4c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
avoid writing past the end of the gcr_track buffer
https://bugs.gentoo.org/show_bug.cgi?id=464708
--- ./src/diskimage/fsimage-create.c.orig
+++ ./src/diskimage/fsimage-create.c
@@ -262,7 +262,7 @@
gcrptr = gcr_track;
util_word_to_le_buf(gcrptr, disk_image_raw_track_size(image->type, track));
gcrptr += 2;
- memset(gcrptr, 0x55, NUM_MAX_BYTES_TRACK);
+ memset(gcrptr, 0x55, NUM_MAX_BYTES_TRACK - 2);
header.track = track;
for (sector = 0;
|