We're already checking in gtk if end highlight offsets don't exceed len.
Do the same for start offset.

I wonder if it this checks should be also done when adding items to tree...

svn path=/trunk/; revision=42596
This commit is contained in:
Jakub Zawadzki 2012-05-12 07:57:51 +00:00
parent bd42162bfe
commit 35745a33cd

View file

@ -1680,10 +1680,10 @@ packet_hex_print(GtkWidget *bv, const guint8 *pd, frame_data *fd,
}
}
if (bstart >= 0 && blen > 0) {
if (bstart >= 0 && blen > 0 && (guint)bstart < len) {
bend = bstart + blen;
}
if (astart >= 0 && alen > 0) {
if (astart >= 0 && alen > 0 && (guint)astart < len) {
aend = astart + alen;
}