"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "epan/ftypes/ftype-protocol.c" between
wireshark-3.4.5.tar.xz and wireshark-3.4.6.tar.xz

About: Wireshark is a network protocol analyzer. It lets you capture and interactively browse the traffic running on a computer network.

ftype-protocol.c  (wireshark-3.4.5.tar.xz):ftype-protocol.c  (wireshark-3.4.6.tar.xz)
skipping to change at line 70 skipping to change at line 70
* terminating NUL. */ * terminating NUL. */
private_data = (guint8 *)g_memdup(s, (guint)strlen(s)); private_data = (guint8 *)g_memdup(s, (guint)strlen(s));
new_tvb = tvb_new_real_data(private_data, new_tvb = tvb_new_real_data(private_data,
(guint)strlen(s), (gint)strlen(s)); (guint)strlen(s), (gint)strlen(s));
/* Let the tvbuff know how to delete the data. */ /* Let the tvbuff know how to delete the data. */
tvb_set_free_cb(new_tvb, g_free); tvb_set_free_cb(new_tvb, g_free);
/* And let us know that we need to free the tvbuff */ /* And let us know that we need to free the tvbuff */
fv->tvb_is_private = TRUE; fv->tvb_is_private = TRUE;
/* This "field" is a value, it has no protocol description. */ /* This "field" is a value, it has no protocol description, but
* we might compare it to a protocol with NULL tvb.
* (e.g., proto_expert) */
fv->value.protocol.tvb = new_tvb; fv->value.protocol.tvb = new_tvb;
fv->value.protocol.proto_string = NULL; fv->value.protocol.proto_string = g_strdup("");
return TRUE; return TRUE;
} }
static gboolean static gboolean
val_from_unparsed(fvalue_t *fv, const char *s, gboolean allow_partial_value _U_, gchar **err_msg) val_from_unparsed(fvalue_t *fv, const char *s, gboolean allow_partial_value _U_, gchar **err_msg)
{ {
tvbuff_t *new_tvb; tvbuff_t *new_tvb;
/* Free up the old value, if we have one */ /* Free up the old value, if we have one */
value_free(fv); value_free(fv);
skipping to change at line 101 skipping to change at line 103
/* Let the tvbuff know how to delete the data. */ /* Let the tvbuff know how to delete the data. */
tvb_set_free_cb(new_tvb, g_free); tvb_set_free_cb(new_tvb, g_free);
/* Free GByteArray, but keep data. */ /* Free GByteArray, but keep data. */
g_byte_array_free(bytes, FALSE); g_byte_array_free(bytes, FALSE);
/* And let us know that we need to free the tvbuff */ /* And let us know that we need to free the tvbuff */
fv->tvb_is_private = TRUE; fv->tvb_is_private = TRUE;
fv->value.protocol.tvb = new_tvb; fv->value.protocol.tvb = new_tvb;
/* This "field" is a value, it has no protocol description, but
* we might compare it to a protocol with NULL tvb.
* (e.g., proto_expert) */
fv->value.protocol.proto_string = g_strdup("");
return TRUE; return TRUE;
} }
/* Not a byte array, forget about it. */ /* Not a byte array, forget about it. */
g_byte_array_free(bytes, TRUE); g_byte_array_free(bytes, TRUE);
/* Treat it as a string. */ /* Treat it as a string. */
return val_from_string(fv, s, err_msg); return val_from_string(fv, s, err_msg);
} }
 End of changes. 3 change blocks. 
2 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)