../../drivers/qmimodem/network-registration.c: In function
‘extract_ss_info’:
../../drivers/qmimodem/network-registration.c:131:54: warning: ‘%03d’
directive output may be truncated writing between 3 and 5 bytes into a
region of size 4 [-Wformat-truncation=]
131 | snprintf(operator->mcc, OFONO_MAX_MCC_LENGTH + 1, "%03d",
| ^~~~
../../drivers/qmimodem/network-registration.c:131:53: note:
directive argument in the range [0, 65535]
131 | snprintf(operator->mcc, OFONO_MAX_MCC_LENGTH + 1,
"%03d",
|
^~~~~~
The MCC/MNC fields are limited to three digits. Clamp the input to 999
to avoid the warning.