mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-09-18 18:22:07 +08:00
Merge pull request #216 from evanmiller/oss-fuzz-28779
Null-terminate binary strings
This commit is contained in:
@@ -1001,8 +1001,9 @@ char *mdb_col_to_string(MdbHandle *mdb, void *buf, int start, int datatype, int
|
||||
if (size<0) {
|
||||
text = g_strdup("");
|
||||
} else {
|
||||
text = g_malloc(size);
|
||||
text = g_malloc(size+1);
|
||||
memcpy(text, (char*)buf+start, size);
|
||||
text[size] = '\0';
|
||||
}
|
||||
break;
|
||||
case MDB_TEXT:
|
||||
|
Reference in New Issue
Block a user