[Bug 3696] New: [IcedTea8] Backport "8076475: Misuses of strncpy/strncat"

bugzilla-daemon at icedtea.classpath.org bugzilla-daemon at icedtea.classpath.org
Thu Feb 7 20:57:08 UTC 2019


https://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3696

            Bug ID: 3696
           Summary: [IcedTea8] Backport "8076475: Misuses of
                    strncpy/strncat"
           Product: IcedTea
           Version: 3.x-hg
          Hardware: all
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: IcedTea
          Assignee: gnu.andrew at redhat.com
          Reporter: gnu.andrew at redhat.com
                CC: unassigned at icedtea.classpath.org

https://bugs.openjdk.java.net/browse/JDK-8076475

Fedora build fails due to strncpy usage combined with strlen:

BUILDSTDERR: In function 'char* strncpy(char*, const char*, size_t)',
BUILDSTDERR:     inlined from 'static void Arguments::fix_appclasspath()' at
/builddir/build/BUILD/icedtea-3.11.0pre02/openjdk-boot/hotspot/src/share/vm/runtime/arguments.cpp:3456:12:
BUILDSTDERR: /usr/include/bits/string_fortified.h:106:34: error: 'char*
__builtin_strncpy(char*, const char*, unsigned int)' specified bound depends on
the length of the source argument [-Werror=stringop-overflow=]
BUILDSTDERR:   106 |   return __builtin___strncpy_chk (__dest, __src, __len,
__bos (__dest));
BUILDSTDERR:       |         
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BUILDSTDERR:
/builddir/build/BUILD/icedtea-3.11.0pre02/openjdk-boot/hotspot/src/share/vm/runtime/arguments.cpp:
In static member function 'static void Arguments::fix_appclasspath()':
BUILDSTDERR:
/builddir/build/BUILD/icedtea-3.11.0pre02/openjdk-boot/hotspot/src/share/vm/runtime/arguments.cpp:3456:30:
note: length computed here
BUILDSTDERR:  3456 |     strncpy(copy, src, strlen(src) + 1);
BUILDSTDERR:       |                        ~~~~~~^~~~~

Looks like 8076475 will fix this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20190207/517cadba/attachment.html>


More information about the distro-pkg-dev mailing list