summaryrefslogtreecommitdiff
path: root/COPYING
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2013-02-26 10:18:37 +0000
committerWill Thompson <will.thompson@collabora.co.uk>2013-02-27 09:30:40 +0000
commit565f2ed54f53adc7bd6793a0e746ceb349843408 (patch)
treec3feef2dbbdfcb47d838e629590d944c3cce2912 /COPYING
parent3e17bf71aa47e7fe52c7053ec5cf44836cf5bd03 (diff)
caps_hash: don't crash if FORM_TYPE has no <value>
Previously there were a couple of ways this could crash: * First, if you had a <field type='hidden' var='FORM_TYPE'> with no <value> child, field->default_value would be NULL so g_value_get_string (field->default_value) would critical and return NULL and then you'll be in undefined hell. * Having fixed that, the code to sort data forms by FORM_TYPE would also crash because it happens before the FORM_TYPEs have been validated and used g_value_get_string() without checking and then strcmp()ed the possibly-NULL result. I actually have a work-in-progress branch that makes this all a lot less hairy by adding, among other things, a wocky_data_form_get_form_type() function which can do the validation for us. But better to fix the crashes before refactoring them away. https://bugs.freedesktop.org/show_bug.cgi?id=61433
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions