diff options
Diffstat (limited to 'meta/recipes-connectivity/nfs-utils/files/fix-a-Gcc-undefined-behavior.patch')
-rw-r--r-- | meta/recipes-connectivity/nfs-utils/files/fix-a-Gcc-undefined-behavior.patch | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/files/fix-a-Gcc-undefined-behavior.patch b/meta/recipes-connectivity/nfs-utils/files/fix-a-Gcc-undefined-behavior.patch deleted file mode 100644 index 5843ba0fb9..0000000000 --- a/meta/recipes-connectivity/nfs-utils/files/fix-a-Gcc-undefined-behavior.patch +++ /dev/null @@ -1,38 +0,0 @@ -[PATCH] fix a Gcc undefined behavior - -Upstream-Status: Pending - -Calling strncpy with NULL second argument, even when the size is 0, -is undefined behavior, which leads to GCC to drop the check old -variable with NULL in following code. - -https://bugzilla.yoctoproject.org/show_bug.cgi?id=6743 - -Signed-off-by: Roy Li <rongqing.li@windriver.com> ---- - support/export/client.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/support/export/client.c b/support/export/client.c -index dbf47b9..a37ef69 100644 ---- a/support/export/client.c -+++ b/support/export/client.c -@@ -482,8 +482,13 @@ add_name(char *old, const char *add) - else - cp = cp + strlen(cp); - } -- strncpy(new, old, cp-old); -- new[cp-old] = 0; -+ -+ if (old) { -+ strncpy(new, old, cp-old); -+ new[cp-old] = 0; -+ } else -+ new[0] = 0; -+ - if (cp != old && !*cp) - strcat(new, ","); - strcat(new, add); --- -1.7.10.4 - |