Re: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy

2019-12-26 Thread Rosen Penev
On Thu, Dec 26, 2019 at 2:32 PM Khem Raj wrote: > > On Thu, Dec 26, 2019 at 4:50 AM Hauke Mehrtens wrote: > > > > On 12/24/19 10:50 PM, Petr Štetiar wrote: > > > Khem Raj [2019-12-24 10:02:13]: > > > > > > Hi, > > > > > > use "PATCH libubox" subject prefix, because there is no blobmsg.c file in

Re: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy

2019-12-26 Thread Khem Raj
On Thu, Dec 26, 2019 at 4:50 AM Hauke Mehrtens wrote: > > On 12/24/19 10:50 PM, Petr Štetiar wrote: > > Khem Raj [2019-12-24 10:02:13]: > > > > Hi, > > > > use "PATCH libubox" subject prefix, because there is no blobmsg.c file in > > the > > main tree. > > > >> Fixes error: '__builtin_strcpy' of

Re: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy

2019-12-26 Thread Hauke Mehrtens
On 12/24/19 10:50 PM, Petr Štetiar wrote: > Khem Raj [2019-12-24 10:02:13]: > > Hi, > > use "PATCH libubox" subject prefix, because there is no blobmsg.c file in the > main tree. > >> Fixes error: '__builtin_strcpy' offset 6 from the object at 'attr' is out of >> the bounds of referenced subobj

Re: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy

2019-12-25 Thread Khem Raj
On Wed, Dec 25, 2019 at 1:48 AM Petr Štetiar wrote: > > Khem Raj [2019-12-24 14:15:26]: > > > On Tue, Dec 24, 2019 at 1:51 PM Petr Štetiar wrote: > > > > > Khem Raj [2019-12-24 10:02:13]: > > > > > > Hi, > > > > > > use "PATCH libubox" subject prefix, because there is no blobmsg.c file in > > >

Re: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy

2019-12-25 Thread Khem Raj
On Wed, Dec 25, 2019 at 1:48 AM Petr Štetiar wrote: > Khem Raj [2019-12-24 14:15:26]: > > > On Tue, Dec 24, 2019 at 1:51 PM Petr Štetiar wrote: > > > > > Khem Raj [2019-12-24 10:02:13]: > > > > > > Hi, > > > > > > use "PATCH libubox" subject prefix, because there is no blobmsg.c file > in > >

Re: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy

2019-12-25 Thread Petr Štetiar
Khem Raj [2019-12-24 14:15:26]: > On Tue, Dec 24, 2019 at 1:51 PM Petr Štetiar wrote: > > > Khem Raj [2019-12-24 10:02:13]: > > > > Hi, > > > > use "PATCH libubox" subject prefix, because there is no blobmsg.c file in > > the > > main tree. > > > > > Fixes error: '__builtin_strcpy' offset 6 fr

Re: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy

2019-12-24 Thread Khem Raj
On Tue, Dec 24, 2019 at 1:51 PM Petr Štetiar wrote: > Khem Raj [2019-12-24 10:02:13]: > > Hi, > > use "PATCH libubox" subject prefix, because there is no blobmsg.c file in > the > main tree. > > > Fixes error: '__builtin_strcpy' offset 6 from the object at 'attr' is > out of > > the bounds of re

Re: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy

2019-12-24 Thread Petr Štetiar
Khem Raj [2019-12-24 10:02:13]: Hi, use "PATCH libubox" subject prefix, because there is no blobmsg.c file in the main tree. > Fixes error: '__builtin_strcpy' offset 6 from the object at 'attr' is out of > the bounds of referenced subobject 'name' with type 'uint8_t[0]' {aka > 'unsigned char[0]

Re: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy

2019-12-24 Thread Khem Raj
On Tue, Dec 24, 2019 at 10:10 AM Paul Fertser wrote: > Hi, > > On Tue, Dec 24, 2019 at 10:02:13AM -0800, Khem Raj wrote: > > + hdr->name[strlen((char*)hdr->name)] = '\0'; > > + strncpy((char *) hdr->name, (const char *)name, > strlen((char*)hdr->name)); > > strlen((char*)hdr->name) doesn'

Re: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy

2019-12-24 Thread Paul Fertser
Hi, On Tue, Dec 24, 2019 at 10:02:13AM -0800, Khem Raj wrote: > + hdr->name[strlen((char*)hdr->name)] = '\0'; > + strncpy((char *) hdr->name, (const char *)name, > strlen((char*)hdr->name)); strlen((char*)hdr->name) doesn't seem to be meaningful in this context, are you sure you were not

[OpenWrt-Devel] [PATCH] use strncpy instead of strcpy

2019-12-24 Thread Khem Raj
Fixes error: '__builtin_strcpy' offset 6 from the object at 'attr' is out of the bounds of referenced subobject 'name' with type 'uint8_t[0]' {aka 'unsigned char[0]'} at offset 6 [-Werror=array-bounds] Signed-off-by: Khem Raj --- blobmsg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-