diff options
author | Noah Goldstein <goldstein.w.n@gmail.com> | 2022-06-22 08:24:21 -0700 |
---|---|---|
committer | Noah Goldstein <goldstein.w.n@gmail.com> | 2022-06-22 11:12:33 -0700 |
commit | 464d189b9622932a75302290625de84931656ec0 (patch) | |
tree | 86633be5a815b19d3e7f72d535dad1d13c6df328 /stdlib/testmb.c | |
parent | dd06af4f81be9e6d6b5e3a72357a51fa7205d856 (diff) | |
download | glibc-464d189b9622932a75302290625de84931656ec0.tar.gz glibc-464d189b9622932a75302290625de84931656ec0.tar.xz glibc-464d189b9622932a75302290625de84931656ec0.zip |
stdlib: Remove attr_write from mbstows if dst is NULL [BZ: 29265]
mbstows is defined if dst is NULL and is defined to special cased if dst is NULL so the fortify objsize check if incorrect in that case. Tested on x86-64 linux. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'stdlib/testmb.c')
-rw-r--r-- | stdlib/testmb.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/stdlib/testmb.c b/stdlib/testmb.c index 45dae7db61..6ac4dfd21d 100644 --- a/stdlib/testmb.c +++ b/stdlib/testmb.c @@ -16,6 +16,13 @@ main (int argc, char *argv[]) lose = 1; } + i = mbstowcs (NULL, "bar", 4); + if (!(i == 3 && w[1] == 'a')) + { + puts ("mbstowcs FAILED2!"); + lose = 1; + } + mbstowcs (w, "blah", 5); i = wcstombs (c, w, 10); if (i != 4) |