[ros-bugs] [Bug 5017] New: [cppcheck] unusual pointer arithmetik in ntosk
ReactOS.Bugzilla at reactos.org
ReactOS.Bugzilla at reactos.org
Sat Dec 12 14:15:50 CET 2009
http://www.reactos.org/bugzilla/show_bug.cgi?id=5017
Summary: [cppcheck] unusual pointer arithmetik in ntosk
Product: ReactOS
Version: TRUNK
Platform: QEmu
OS/Version: ReactOS
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: Kernel
AssignedTo: ros-bugs at reactos.org
ReportedBy: ettl.martin at gmx.de
QAContact: ros-bugs at reactos.org
during a check with the static code analysis tool cppcheck it detected several
issues regarding 'unusual pointer arithmethik':
in folder /reactos/ntoskrnl/kdbg/:
[i386-dis.c:3015]: (Error) Unusual pointer arithmetic
[i386-dis.c:3020]: (Error) Unusual pointer arithmetic
[i386-dis.c:3025]: (Error) Unusual pointer arithmetic
[i386-dis.c:3030]: (Error) Unusual pointer arithmetic
[i386-dis.c:3035]: (Error) Unusual pointer arithmetic
[i386-dis.c:3040]: (Error) Unusual pointer arithmetic
[i386-dis.c:3957]: (Error) Unusual pointer arithmetic
lets take a look at the sourcode:
....
static char intel_syntax;
....
used_prefixes |= PREFIX_CS;
oappend ("%cs:" + intel_syntax);
....
here, a character string is concatenated with an static char variable. This is
us not the correct way. char strings are concatenated with strcat or strncat.
Best regards
Ettl Martin
--
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the Ros-bugs
mailing list