Message ID | alpine.DEB.2.22.394.2110192055210.10354@digraph.polyomino.org.uk |
---|---|
State | New |
Headers | show |
Series | [v2] Correct access attribute on memfrob (bug 28475) | expand |
* Joseph Myers: > diff --git a/elf/tst-execstack-needed.c b/elf/tst-execstack-needed.c > index 8b794a3d47..85078e40ef 100644 > --- a/elf/tst-execstack-needed.c > +++ b/elf/tst-execstack-needed.c > @@ -26,7 +26,7 @@ static void > deeper (void (*f) (void)) > { > char stack[1100 * 1024]; > - memfrob (stack, sizeof stack); > + explicit_bzero (stack, sizeof stack); > (*f) (); > memfrob (stack, sizeof stack); > } > diff --git a/elf/tst-execstack-prog.c b/elf/tst-execstack-prog.c > index 8663153372..1b34bb5597 100644 > --- a/elf/tst-execstack-prog.c > +++ b/elf/tst-execstack-prog.c > @@ -25,7 +25,7 @@ static void > deeper (void (*f) (void)) > { > char stack[1100 * 1024]; > - memfrob (stack, sizeof stack); > + explicit_bzero (stack, sizeof stack); > (*f) (); > memfrob (stack, sizeof stack); > } > diff --git a/elf/tst-execstack.c b/elf/tst-execstack.c > index 114f341d76..7e898b4f58 100644 > --- a/elf/tst-execstack.c > +++ b/elf/tst-execstack.c > @@ -227,7 +227,7 @@ static void > deeper (void (*f) (void)) > { > char stack[1100 * 1024]; > - memfrob (stack, sizeof stack); > + explicit_bzero (stack, sizeof stack); > (*f) (); > memfrob (stack, sizeof stack); > } > diff --git a/string/string.h b/string/string.h > index 04e1b7067d..201d7e31c8 100644 > --- a/string/string.h > +++ b/string/string.h > @@ -495,7 +495,7 @@ extern char *strfry (char *__string) __THROW __nonnull ((1)); > > /* Frobnicate N bytes of S. */ > extern void *memfrob (void *__s, size_t __n) __THROW __nonnull ((1)) > - __attr_access ((__write_only__, 1, 2)); > + __attr_access ((__read_write__, 1, 2)); > > # ifndef basename > /* Return the file name within directory of FILENAME. We don't Patch looks good. Thanks, Florian
diff --git a/elf/tst-execstack-needed.c b/elf/tst-execstack-needed.c index 8b794a3d47..85078e40ef 100644 --- a/elf/tst-execstack-needed.c +++ b/elf/tst-execstack-needed.c @@ -26,7 +26,7 @@ static void deeper (void (*f) (void)) { char stack[1100 * 1024]; - memfrob (stack, sizeof stack); + explicit_bzero (stack, sizeof stack); (*f) (); memfrob (stack, sizeof stack); } diff --git a/elf/tst-execstack-prog.c b/elf/tst-execstack-prog.c index 8663153372..1b34bb5597 100644 --- a/elf/tst-execstack-prog.c +++ b/elf/tst-execstack-prog.c @@ -25,7 +25,7 @@ static void deeper (void (*f) (void)) { char stack[1100 * 1024]; - memfrob (stack, sizeof stack); + explicit_bzero (stack, sizeof stack); (*f) (); memfrob (stack, sizeof stack); } diff --git a/elf/tst-execstack.c b/elf/tst-execstack.c index 114f341d76..7e898b4f58 100644 --- a/elf/tst-execstack.c +++ b/elf/tst-execstack.c @@ -227,7 +227,7 @@ static void deeper (void (*f) (void)) { char stack[1100 * 1024]; - memfrob (stack, sizeof stack); + explicit_bzero (stack, sizeof stack); (*f) (); memfrob (stack, sizeof stack); } diff --git a/string/string.h b/string/string.h index 04e1b7067d..201d7e31c8 100644 --- a/string/string.h +++ b/string/string.h @@ -495,7 +495,7 @@ extern char *strfry (char *__string) __THROW __nonnull ((1)); /* Frobnicate N bytes of S. */ extern void *memfrob (void *__s, size_t __n) __THROW __nonnull ((1)) - __attr_access ((__write_only__, 1, 2)); + __attr_access ((__read_write__, 1, 2)); # ifndef basename /* Return the file name within directory of FILENAME. We don't