settings.h: IMSI is 15 bytes +1 \0 maximum
authorHarald Welte <laforge@gnumonks.org>
Sat, 16 Jul 2011 15:41:02 +0000 (17:41 +0200)
committerHarald Welte <laforge@gnumonks.org>
Sat, 16 Jul 2011 15:41:02 +0000 (17:41 +0200)
commit48db968916514a9950fd1f8d43bbf389c39b1d53
tree3d06810cc17666285f2b0e9582d925e3ee26cf9b
parenteb77945e162ae1968242009372e448b7af51ea50
settings.h: IMSI is 15 bytes +1 \0 maximum

If we use a larger field to store the IMSI, we can create overflows when
copying the imsi to other structures that are only 16 bytes in size.

Detected by Smatch:
src/host/layer23/src/mobile/subscriber.c +195 gsm_subscr_testcard(39) error: strcpy() 'set->test_imsi' too large for 'subscr->imsi' (20 vs 16)
src/host/layer23/include/osmocom/bb/mobile/settings.h