head     1.1;
branch   1.1.1;
access   ;
symbols  start:1.1.1.1 project:1.1.1;
locks    ; strict;
comment  @# @;


1.1
date     2009.07.09.02.51.49;  author yo2dh;  state Exp;
branches 1.1.1.1;
next     ;

1.1.1.1
date     2009.07.09.02.51.49;  author yo2dh;  state Exp;
branches ;
next     ;


desc
@@



1.1
log
@Initial revision
@
text
@(lp0
(i__main__
Hit
p1
(dp2
S'category'
p3
S'buffer'
p4
sS'end'
p5
I315
sS'name'
p6
S'strcpy'
p7
sS'parameters'
p8
(lp9
S''
p10
aS'qwer'
p11
aS'asdf'
p12
asS'level'
p13
I4
sS'url'
p14
g10
sS'column'
p15
I2
sS'context_text'
p16
S'\tstrcpy( qwer , asdf );'
p17
sS'hook'
p18
c__main__
c_buffer
p19
sS'warning'
p20
S'Does not check for buffer overflows when copying to destination'
p21
sS'suggestion'
p22
S'Consider using strncpy or strlcpy (warning, strncpy is easily misused)'
p23
sS'line'
p24
I22
sS'filename'
p25
S'Test1.c'
p26
sS'start'
p27
I309
sba(i__main__
Hit
p28
(dp29
g3
g4
sg25
g26
sg5
I59
sg6
S'char'
p30
sg8
(lp31
sg13
I2
sg14
g10
sS'lookahead'
p32
S'char asdf[128];\n\tchar qwer[256];\n\n\tmemset( asdf , 0 , sizeof( asdf ) );\n\tmemset( qwer , 0 , sizeof( qwer ) );\n\n\tif( sizeof( qwer ) > sizeof( asdf ) )\n\t{\n\t\tmemcpy( qwer , asdf , sizeof( asdf ) );\n\t}\n\telse\n\t{\n\t\tmemcpy( asdf , qwer , sizeof( qwer ) );\n\t}\n\n\tstrcpy( qwer , asdf );\n\n\treturn 0;\n}\n'
p33
sg15
I2
sg16
S'\tchar asdf[128];'
p34
sg18
c__main__
c_static_array
p35
sg20
S'Statically-sized arrays can be overflowed'
p36
sg22
S'Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length'
p37
sg24
I7
sS'extract_lookahead'
p38
I1
sg27
I55
sba(i__main__
Hit
p39
(dp40
g3
g4
sg25
g26
sg5
I76
sg6
S'char'
p41
sg8
(lp42
sg13
I2
sg14
g10
sg32
S'char qwer[256];\n\n\tmemset( asdf , 0 , sizeof( asdf ) );\n\tmemset( qwer , 0 , sizeof( qwer ) );\n\n\tif( sizeof( qwer ) > sizeof( asdf ) )\n\t{\n\t\tmemcpy( qwer , asdf , sizeof( asdf ) );\n\t}\n\telse\n\t{\n\t\tmemcpy( asdf , qwer , sizeof( qwer ) );\n\t}\n\n\tstrcpy( qwer , asdf );\n\n\treturn 0;\n}\n'
p43
sg15
I2
sg16
S'\tchar qwer[256];'
p44
sg18
g35
sg20
g36
sg22
g37
sg24
I8
sg38
I1
sg27
I72
sba(i__main__
Hit
p45
(dp46
g3
g4
sg5
I216
sg6
S'memcpy'
p47
sg8
(lp48
g10
aS'qwer'
p49
aS'asdf'
p50
aS'sizeof( asdf )'
p51
asg13
I2
sg14
g10
sg15
I3
sg16
S'\t\tmemcpy( qwer , asdf , sizeof( asdf ) );'
p52
sg18
c__main__
normal
p53
sg20
g21
sg22
S'Make sure destination can always hold the source data'
p54
sg24
I15
sg25
g26
sg27
I210
sba(i__main__
Hit
p55
(dp56
g3
g4
sg5
I270
sg6
S'memcpy'
p57
sg8
(lp58
g10
aS'asdf'
p59
aS'qwer'
p60
aS'sizeof( qwer )'
p61
asg13
I2
sg14
g10
sg15
I3
sg16
S'\t\tmemcpy( asdf , qwer , sizeof( qwer ) );'
p62
sg18
g53
sg20
g21
sg22
g54
sg24
I19
sg25
g26
sg27
I264
sba.
@


1.1.1.1
log
@CVS TEST
@
text
@@
