SHA256
1
0
forked from pool/mtools
mtools/mtools-4.0.1-overflow.diff

23 lines
666 B
Diff

--- file_name.c
+++ file_name.c
@@ -145,7 +145,7 @@ void dos_name(doscp_t *toDos, const char
wchar_t *unix_name(doscp_t *dosCp,
const char *base, const char *ext, char Case, wchar_t *ret)
{
- char *s, tname[9], text[4], ans[11];
+ char *s, tname[9], text[4], ans[13];
int i;
strncpy(tname, base, 8);
--- mpartition.c
+++ mpartition.c
@@ -514,7 +514,7 @@ void mpartition(int argc, char **argv, i
read(fd, (char *) buf, 512);
}
memset((char *)(partTable+1), 0, 4*sizeof(*partTable));
- set_dword(((unsigned char*)buf)+510, 0xaa55);
+ set_word(((unsigned char*)buf)+510, 0xaa55);
}
/* check for boot signature, and place it if needed */