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 &g

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 &qu

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 "PA

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

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((cha

[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 |