[syslinux] [syslinux:rockridge] iso9660.c did not copy terminating 0 of Rock Ridge name

Thomas Schmitt scdbackup at gmx.net
Thu Apr 25 09:17:17 PDT 2013


Hi,

> Would it be possible for a (broken) disc to have a non-null-terminated
> name here?

The descriptions of functions susp_rr_get_entries() and susp_rr_get_nm()
in susp_rr.h promise trailing 0-bytes.
This is implemented by line 376 in susp_rr.c:
        new_data[count] = 0;

My test call of susp_rr_get_nm() in libisofs/fs_image.c relies on this.
Test runs were done under control of valgrind.


> memcpy(dirent->d_name, rr_name, name_len);
> dirent->d_name[name_len] = '\0';

It cannot harm, at least.

I am still pondering how to realistically test the changes in iso9660.c.
(The code in susp_rr.[ch] is supposed to be quite well tested.)


BTW:
Matt's commit of my patch still does not show up in
  http://git.kernel.org/cgit/boot/syslinux/syslinux.git/log/?h=rockridge


Have a nice day :)

Thomas



More information about the Syslinux mailing list