Skip to content

Commit

Permalink
Null terminate string passed to stncpy
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmark committed Oct 30, 2022
1 parent bc8aea9 commit 92187bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion partition_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ add_partition_to_map(const char *name, const char *dptype, uint32_t base, uint32
if (strstr(dptype, "Driver"))
{
// Assume 68k drivers for now
strncpy(cur->data->dpme_process_id, "68000", 5);
strncpy(cur->data->dpme_process_id, "68000\0", 6);

Block0* bz = map->misc;
if (bz->sbDrvrCount < sizeof(bz->sbMap) / sizeof(DDMap))
Expand Down

0 comments on commit 92187bc

Please sign in to comment.