OpenBSC bug that triggers Qualcomm baseband bug (patch)

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Tobias Engel t-openbsc at tobias.org
Fri Feb 24 19:05:10 UTC 2012


Hi Harald,

> thanks for your bug analysis and patch. However, I don't really see how
> 
>> -       if (strstr(USSD_TEXT_OWN_NUMBER, req.text) != NULL) {
>> +       if (strcmp(USSD_TEXT_OWN_NUMBER, (const char *) req.text) == 0) {
> 
> will fix it. What other SS operations include a *#100# in them, so the
> old code would match on them?

no, the old code matches any _substring_ of "*#100#", including the
empty string (which is the case if it was a non-USSD-SS operation).

(In strstr, a substring of the second parameter is searched for in the
first parameter.)

If it would have been

       if (strstr(req.text, USSD_TEXT_OWN_NUMBER) != NULL) {

only strings that at least included "*#100#" would have been matched.

-Tobias




More information about the OpenBSC mailing list