Skip to content

Commit

Permalink
fixed bug from last fix
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdavidgraham committed Nov 8, 2023
1 parent ec509fb commit dd2a1f2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/templ-tcp-hdr.c
Expand Up @@ -1121,7 +1121,7 @@ _replace_options(unsigned char **inout_buf, size_t *inout_length,
old_length = hdr.max - offset;

/* Either increase or decrease the old length appropriately */
_HEXDUMPopt(buf, length, "resize before");
//_HEXDUMPopt(buf, length, "resize before");
adjust = (int)(new_length - old_length);
if (adjust > 0) {
length += adjust;
Expand All @@ -1137,10 +1137,7 @@ _replace_options(unsigned char **inout_buf, size_t *inout_length,
length += adjust;
buf = realloc(buf, length);
}
_adjust_length(buf, length, adjust, hdr);
_normalize_padding(&buf, &length);

_HEXDUMPopt(buf, length, "resize after");

/* Now that we've resized the options field, overright
* it with then new field */
Expand Down

0 comments on commit dd2a1f2

Please sign in to comment.