Infinite loop in bonobo_ui_util_accel_parse



Hi,

bonobo_ui_util_accel_parse in bonobo/bonobo/bonobo-ui-util.c can enter
an infinite loop if there is a typo in 'accelerator'

I noticed it  with a menu item ui node with accel="*Contrl*l"

The problem seems to be that all the is_control, is_shift etc all fail
and so the if-else tree falls through to the while loop at line 1300
"while (last_ch && last_ch != DELIM_POST)", last_ch does equal
DELIM_POST so the loop never gets run and we return straight to the top
to start again. Lather-Rinse-Repeat.

I guess a g_return_if_fail(last_ch != DELIM_POST) at about line 1299
might be the best solution, but I am not familiar enough with the format
of the accel string to say for sure.

Ian

-- 
Ian Campbell
Churchill College, Cambridge.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]