The NULL termination is written to the 11th element of the result buffer, when it should be the 10th. --- lib/iso9660/rock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/iso9660/rock.c b/lib/iso9660/rock.c index a957d785..5b6e67d9 100644 --- a/lib/iso9660/rock.c +++ b/lib/iso9660/rock.c @@ -471,7 +471,7 @@ iso9660_get_rock_attr_str(posix_mode_t st_mode) result[ 8] = (st_mode & ISO_ROCK_IWOTH) ? 'w' : '-'; result[ 9] = (st_mode & ISO_ROCK_IXOTH) ? 'x' : '-'; - result[11] = '\0'; + result[10] = '\0'; return result; }