Skip to content

Commit 987eaec

Browse files
committed
fix: iomanX null terminate after strncpy in parsefile
1 parent e3bea49 commit 987eaec

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

iop/system/iomanx/src/iomanX.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,7 @@ static const char *parsefile(const char *path, iomanX_iop_device_t **p_device, i
10521052
if ( devname_len > (sizeof(canon) - 1) )
10531053
return NULL;
10541054
strncpy(canon, path_trimmed, devname_len);
1055+
canon[devname_len] = 0;
10551056
unit = 0;
10561057
// Search backward for the unit number.
10571058
while ( isnum(canon[devname_len - 1]) )

0 commit comments

Comments
 (0)