blob: 2efc4d3e1313572ebb1940a855fde395c8431d57 (
plain) (
blame)
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
|
/*
bug-2890326.c
*/
#include <testfwk.h>
unsigned short _sLineLen;
unsigned char *_pLine;
void line_add_crlf()
{
_pLine[_sLineLen] = '\r';
_sLineLen ++;
_pLine[_sLineLen] = '\n';
_sLineLen ++;
_pLine[_sLineLen] = 0;
}
void testBug(void)
{
unsigned char b[4];
_sLineLen = 0;
_pLine = b;
line_add_crlf();
ASSERT(b[1] == '\n');
ASSERT(!b[2]);
ASSERT(_sLineLen == 2);
}
|