projects
/
libc-test
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fmaf test case that's hard to round in nearest rounding mode
[libc-test]
/
src
/
regression
/
putenv-doublefree.c
1
// commit 9543656cc32fda48fc463f332ee20e91eed2b768 2016-03-06
2
// __putenv could be confused into freeing storage that does not belong to the implementation
3
#define _XOPEN_SOURCE 700
4
#include <stdlib.h>
5
#include <string.h>
6
7
int main(void)
8
{
9
setenv("A", "1", 1);
10
setenv("A", "2", 1);
11
char *c = strdup("A=3");
12
putenv(c);
13
setenv("A", "4", 1);
14
free(c);
15
return 0;
16
}