From: Harald Welte Date: Sat, 16 Jul 2011 10:05:49 +0000 (+0200) Subject: tlv: Make tlv parser arrays 256 entries wide to prevent overflow on 0xff X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=79599ba0eb7a9aeaeb9dfbbf4881f0633724a471;p=osmocom-bb.git tlv: Make tlv parser arrays 256 entries wide to prevent overflow on 0xff If we encounter a tag with 0xFF, we overflow our existing tlv_parse array definitions. Warning: this breaks ABI --- diff --git a/include/osmocom/gsm/tlv.h b/include/osmocom/gsm/tlv.h index 552af2b..1e59cca 100644 --- a/include/osmocom/gsm/tlv.h +++ b/include/osmocom/gsm/tlv.h @@ -236,11 +236,11 @@ struct tlv_def { }; struct tlv_definition { - struct tlv_def def[0xff]; + struct tlv_def def[265]; }; struct tlv_parsed { - struct tlv_p_entry lv[0xff]; + struct tlv_p_entry lv[265]; }; extern struct tlv_definition tvlv_att_def; diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 88b2d9a..f5e4676 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -1,6 +1,6 @@ # This is _NOT_ the library release version, it's an API version. # Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification -LIBVERSION=0:0:0 +LIBVERSION=1:0:0 INCLUDES = $(all_includes) -I$(top_srcdir)/include AM_CFLAGS = -fPIC -Wall