blob: 55e852b6c5ab71ea72e61790844eb1e542422796 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/* bug-2347.c
An bug in marking rematerializeable variables
*/
#include <testfwk.h>
#include <string.h>
const unsigned char star_star_filename[] = { '*', '.', '*', 0xff };
void
dos_catalog(const char *filename)
{
char filename_copy[10];
int len = 10;
if (filename == NULL)
filename = star_star_filename;
len = strlen(filename);
memcpy(filename_copy, filename, len); // This memcpy() always used star_star_filename as source.
ASSERT(filename_copy[0] == 'X');
}
void testBug(void)
{
dos_catalog("X");
}
|