Re: [PATCH] libibmad/dump.c: clean up boundary conditions in dump routines

2012-05-25 Thread Ira Weiny
On Fri, 25 May 2012 15:33:01 -0700 Jim Foraker wrote: > If mad_dump_field() exhausts the buffer, _dump_fields() would > accidentally write 1 byte beyond its end. Additionally, several > functions call _dump_fields() repeatedly without checking for > a negative return; these could clobber memory

[PATCH] libibmad/dump.c: clean up boundary conditions in dump routines

2012-05-25 Thread Jim Foraker
If mad_dump_field() exhausts the buffer, _dump_fields() would accidentally write 1 byte beyond its end. Additionally, several functions call _dump_fields() repeatedly without checking for a negative return; these could clobber memory before the buffer. Signed-off-by: Jim Foraker --- src/dump.c