Skip to content

Commit aca9762

Browse files
committed
Reapply "Merge pull request ps2dev#687 from uyjulian/iomanx_null_terminate_after_strncpy"
This reverts commit a6cc6d8.
1 parent 75f862a commit aca9762

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

iop/system/iomanx/src/iomanX.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,7 @@ static const char *parsefile(const char *path, iomanX_iop_device_t **p_device, i
10591059
if ( devname_len > (sizeof(canon) - 1) )
10601060
return NULL;
10611061
strncpy(canon, path_trimmed, devname_len);
1062+
canon[devname_len] = 0;
10621063
unit = 0;
10631064
// Search backward for the unit number.
10641065
while ( isnum(canon[devname_len - 1]) )

0 commit comments

Comments
 (0)