projects
/
platform
/
upstream
/
dbus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Optional autogen.sh flag --enable-kdbus-transport added allowing to compile...
[platform/upstream/dbus.git]
/
bus
/
desktop-file.c
diff --git
a/bus/desktop-file.c
b/bus/desktop-file.c
index
9f88d6e
..
bfeb72e
100644
(file)
--- a/
bus/desktop-file.c
+++ b/
bus/desktop-file.c
@@
-21,6
+21,8
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
+
+#include <config.h>
#include <dbus/dbus-sysdeps.h>
#include <dbus/dbus-internals.h>
#include "desktop-file.h"
#include <dbus/dbus-sysdeps.h>
#include <dbus/dbus-internals.h>
#include "desktop-file.h"
@@
-686,6
+688,12
@@
bus_desktop_file_load (DBusString *filename,
else if (is_blank_line (&parser) ||
_dbus_string_get_byte (&parser.data, parser.pos) == '#')
parse_comment_or_blank (&parser);
else if (is_blank_line (&parser) ||
_dbus_string_get_byte (&parser.data, parser.pos) == '#')
parse_comment_or_blank (&parser);
+ else if (parser.current_section < 0)
+ {
+ dbus_set_error(error, DBUS_ERROR_FAILED,
+ "invalid service file: key=value before [Section]");
+ return NULL;
+ }
else
{
if (!parse_key_value (&parser, error))
else
{
if (!parse_key_value (&parser, error))