[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #63530] xgettext: return value not checked in locating_rule_list_ad
From: |
Shashank |
Subject: |
[bug #63530] xgettext: return value not checked in locating_rule_list_add_from_file() [NULL-ptr dereference] |
Date: |
Wed, 14 Dec 2022 20:05:30 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?63530>
Summary: xgettext: return value not checked in
locating_rule_list_add_from_file() [NULL-ptr dereference]
Project: GNU gettext
Submitter: theshank
Submitted: Thu 15 Dec 2022 01:05:28 AM UTC
Category: C
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Thu 15 Dec 2022 01:05:28 AM UTC By: Shashank <theshank>
In locating_rule_list_add_from_file() (located in
gettext-tools/src/locating-rule.c), the return value of xmlDocGetRootElement()
is not checked before continuing further, which would cause a NULL-ptr
dereference on the very next line, whenever xmlDocGetRootElement() returns
NULL.
static bool
locating_rule_list_add_from_file (struct locating_rule_list_ty *rules,
const char *rule_file_name)
{
...
root = xmlDocGetRootElement (doc);
if (!(xmlStrEqual (root->name, BAD_CAST "locatingRules")
...
}
-verbatim+
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63530>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #63530] xgettext: return value not checked in locating_rule_list_add_from_file() [NULL-ptr dereference],
Shashank <=