First and formost: Thanks for supplying a new dissector!
On Sun, Sep 15, 2002 at 11:27:31AM -0600, PC Drew wrote:
> I've included the two files related to the FIX dissector (the packet-fix.c
> and packet-fix.h files) as well as a patch to the Makefile.am that inserts
> the packet-fix.c and packet-fix.h files into the build chain.
Just a few comments for now:
Is there a reason why you wrote your own stringCopy routine instead of using
either strncpy (if a terminating \0 in the string is ok as an exit condition
too) or memcpy (if you always want to copy all the date)?
Please don't use // style comments - Ethereal is build on systems/compilers
too that do not support C99 comments.
Is there a reason why you put some stuff into a separate .h file? I find
include files with static statements somewhat contradictory, but maybe
someone can tell me that this makes sense. Anyway, I'd be happier if you
just put the code from the .h file into the .c file :-)
You include some things that you never use, e.g. sys/types.h, snprintf.h,
netinet/in.h (from memory).
It looks like your code has problems with overflowing buffers in case of
malformed packets, e.g.
// begin string
ctrla_ptr = strchr(line_start, 0x01);
What happens, if the packet doesn't contain ^A?
Ciao
Jörg