Skip to content

Commit

Permalink
fix: iomanX null terminate after strncpy in parsefile
Browse files Browse the repository at this point in the history
  • Loading branch information
uyjulian committed Dec 1, 2024
1 parent e3bea49 commit 987eaec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions iop/system/iomanx/src/iomanX.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,7 @@ static const char *parsefile(const char *path, iomanX_iop_device_t **p_device, i
if ( devname_len > (sizeof(canon) - 1) )
return NULL;
strncpy(canon, path_trimmed, devname_len);
canon[devname_len] = 0;
unit = 0;
// Search backward for the unit number.
while ( isnum(canon[devname_len - 1]) )
Expand Down

0 comments on commit 987eaec

Please sign in to comment.