Re: [PATCH] src: Fix another build warning / error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 12, 2018 at 01:25:35PM +1000, Duncan Roe wrote:
> gcc 8.1 warns when it can detect that a strncpy may result in a string with no
> null terminator. It also warns when it can similarly detect that an snprintf may
> discard characters, unless the return value from that snprintf is tested.
> gcc 8.1.0 (latest release) does not complain about the patched line, but the
> gcc 8.1.1 snapshot that comes with FC28 does.

Thanks Duncan!

But it seems this patch doesn't apply cleanly to ebtables.git?

$ patch -p1 < /tmp/src-Fix-another-build-warning-error.patch 
patching file extensions/ebt_string.c
Hunk #1 FAILED at 168.
1 out of 1 hunk FAILED -- saving rejects to file
extensions/ebt_string.c.rej

Let me know!

P.S: BTW, I would suggest a patch subject like: "extensions:
ebt_string: fix compilation warning related to strncpy" or similar
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux