]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
libio: Use wmemset instead of __wmemset to avoid linknamespace issue
authorFlorian Weimer <fweimer@redhat.com>
Fri, 3 Jun 2016 07:48:14 +0000 (09:48 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 3 Jun 2016 15:04:44 +0000 (17:04 +0200)
If the wide string operations are pulled into the link, the
wmemset symbol can cause a linknamespace failure.

ChangeLog
libio/wstrops.c

index 4e7fd30b49030e42dd4b2bab692aaecbd0a29ad3..94a95f3c0020e9e3034c297fd8fcc4d3a9a599ab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-03  Florian Weimer  <fweimer@redhat.com>
+
+       * libio/wstrops.c (_IO_wstr_overflow, enlarge_userbuf): Use
+       __wmemset instead of wmemset.
+
 2016-06-02  Carlos O'Donell  <carlos@redhat.com>
 
        * sysdeps/unix/sysv/linux/bits/in.h [defined _UAPI_LINUX_IN6_H ||
index 2b9d0368f3b1f80cef43e3e9ffa9eb5a8c097f07..8d0e1cb331081935d2ffd6403e7247396e519f7d 100644 (file)
@@ -111,7 +111,7 @@ _IO_wstr_overflow (_IO_FILE *fp, _IO_wint_t c)
              fp->_wide_data->_IO_buf_base = NULL;
            }
 
-         wmemset (new_buf + old_wblen, L'\0', new_size - old_wblen);
+         __wmemset (new_buf + old_wblen, L'\0', new_size - old_wblen);
 
          _IO_wsetb (fp, new_buf, new_buf + new_size, 1);
          fp->_wide_data->_IO_read_base =
@@ -228,9 +228,9 @@ enlarge_userbuf (_IO_FILE *fp, _IO_off64_t offset, int reading)
      new position.  */
   assert (offset >= oldend);
   if (reading)
-    wmemset (wd->_IO_read_base + oldend, L'\0', offset - oldend);
+    __wmemset (wd->_IO_read_base + oldend, L'\0', offset - oldend);
   else
-    wmemset (wd->_IO_write_base + oldend, L'\0', offset - oldend);
+    __wmemset (wd->_IO_write_base + oldend, L'\0', offset - oldend);
 
   return 0;
 }