[libdvdnav-devel] [PATCH] sprintf -> strcpy

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Wed Sep 9 10:15:51 CEST 2015


On Wed, 9 Sep 2015 10:05:52 +0200, Jean-Baptiste Kempf wrote:

> On 09 Sep, Lawrence D'Oliveiro wrote :
>
>> On Wed, 9 Sep 2015 09:59:30 +0200, Jean-Baptiste Kempf wrote:
>> 
>>> On 09 Sep, Lawrence D'Oliveiro wrote :
>>>
>>>> On Wed,  9 Sep 2015 10:11:16 +0300, Petri Hintukainen wrote:
>>>> 
>>>>> -    sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" );
>>>>> +    strcpy( filename, "/VIDEO_TS/VIDEO_TS.VOB" );
>>>> [etc]
>>>> 
>>>> I would not use either. I would use strncpy instead.
>>> 
>>> strlcpy, maybe?
>> 
>> Sounds good, but it’s not POSIX, is it?
> 
> So what?

So check for its presence before using it!


More information about the libdvdnav-devel mailing list