]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/conf-parser.c
make sure we don't choke on overly long lines in .desktop files
[pulseaudio] / src / pulsecore / conf-parser.c
index b7ec2b3c7138df246af5f347e089bde2ce0f0337..1d98f36c22ef717cd22dc0e7f39693cca91a3eb7 100644 (file)
@@ -127,7 +127,7 @@ static int parse_line(const char *filename, unsigned line, char **section, const
 int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, void *userdata) {
     int r = -1;
     unsigned line = 0;
-    int do_close = !f;
+    pa_bool_t do_close = !f;
     char *section = NULL;
 
     pa_assert(filename);
@@ -144,7 +144,7 @@ int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, void
     }
 
     while (!feof(f)) {
-        char l[256];
+        char l[4096];
 
         if (!fgets(l, sizeof(l), f)) {
             if (feof(f))