blob: 876142e160212813a99ece72e29b981ea34b173a [file] [log] [blame]
/* Unitialized variable in returned structure. */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
typedef struct
{
union {
char *ptr;
int value;
} items;
int value;
} Xstruct;
Xstruct *newXstruct()
{
return malloc(sizeof(Xstruct));
}
int main()
{
Xstruct *x;
x = newXstruct();
printf("%p\n", strstr(x->items.ptr, "string"));
free(x);
return 0;
}