[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libcdio-devel] Fedora bug report concerning CD-TEXT
From: |
Leon Merten Lohse |
Subject: |
Re: [Libcdio-devel] Fedora bug report concerning CD-TEXT |
Date: |
Sat, 2 Apr 2016 09:39:27 +0200 |
On Sat, 02 Apr 2016 09:23:29 +0200
"Thomas Schmitt" <address@hidden> wrote:
> Hi,
>
> it turned out that the code about reading ISRC is potentially
> dangerous because its strdup() relies on MMC-4 specs which promise a
> 0-byte in byte 17 of the reply of READ SUB-CHANNEL.
How about
strndup(&buf[9], 16);
instead of the additional byte?
From the manual:
The strndup() function is similar, but copies at most n bytes. If s
is longer than n, only n bytes are copied, and a terminating null
byte ('\0') is added.
Would at least save the constant 25.
Best regards
Leon
- Re: [Libcdio-devel] Fedora bug report concerning CD-TEXT, Thomas Schmitt, 2016/04/01
- Re: [Libcdio-devel] Fedora bug report concerning CD-TEXT, Leon Merten Lohse, 2016/04/01
- Re: [Libcdio-devel] Fedora bug report concerning CD-TEXT, Thomas Schmitt, 2016/04/01
- Re: [Libcdio-devel] Fedora bug report concerning CD-TEXT, Thomas Schmitt, 2016/04/02
- Re: [Libcdio-devel] Fedora bug report concerning CD-TEXT,
Leon Merten Lohse <=
- Re: [Libcdio-devel] Fedora bug report concerning CD-TEXT, Thomas Schmitt, 2016/04/02
- Re: [Libcdio-devel] Fedora bug report concerning CD-TEXT, Rocky Bernstein, 2016/04/02
- Re: [Libcdio-devel] Fedora bug report concerning CD-TEXT, Thomas Schmitt, 2016/04/03
- Re: [Libcdio-devel] Fedora bug report concerning CD-TEXT, Leon Merten Lohse, 2016/04/03
- Re: [Libcdio-devel] Fedora bug report concerning CD-TEXT, Thomas Schmitt, 2016/04/03
- Re: [Libcdio-devel] Fedora bug report concerning CD-TEXT, Thomas Schmitt, 2016/04/03
- Re: [Libcdio-devel] Fedora bug report concerning CD-TEXT, Rocky Bernstein, 2016/04/03
- Re: [Libcdio-devel] Fedora bug report concerning CD-TEXT, Thomas Schmitt, 2016/04/03
- Re: [Libcdio-devel] Fedora bug report concerning CD-TEXT, Rocky Bernstein, 2016/04/03
Re: [Libcdio-devel] Fedora bug report concerning CD-TEXT, Leon Merten Lohse, 2016/04/02