static int hexMode = HEXMODE;
-static const char trbcmd_version[] = "$Revision: 2.58 $";
+static const char trbcmd_version[] = "$Revision: 2.59 $";
#define BACKLOG 10
static uint16_t tcp_port = 55555;
while (p < end) {
len = (*p >> 16) & 0xffff;
fprintf(stdout, "H: 0x%04x 0x%04x\n", (*p++) & 0xffff, len);
- for (i = 0; (i < len) && (p < end); i++) {
+ for (i = 0; (i < len) && ((p + 1) < end); i++) {
fprintf(stdout, "0x%04x 0x%08x 0x%04x\n",
(option == 0 ? reg_address + i : i),
*p, *(p + 1));
-const char trbnet_version[] = "$Revision: 2.78 $";
+const char trbnet_version[] = "$Revision: 2.79 $";
#include <stdlib.h>
#include <signal.h>
trb_errno = TRB_READMEM_INVALID_SIZE;
return -1;
}
- p += len + 1;
+ p += len * 2 + 1;
}
return status;