summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrcyeske <rcyeske>2001-03-08 03:18:42 +0000
committerrcyeske <rcyeske>2001-03-08 03:18:42 +0000
commit381857aabfc54cf256df9371674bf3eeef2f32ca (patch)
tree339f44f751d6e0b3194fb22be33b3529a298a5de
parentec98560f785194f3055e4ea4e6ea0743f0cafdc2 (diff)
downloadratpoison-381857aabfc54cf256df9371674bf3eeef2f32ca.zip
* main.c (read_rc_file): Fix typo that was resulting in exhausting
all memory parsing the rc file.
-rw-r--r--src/ChangeLog3
-rw-r--r--src/main.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9657610..7aa3805 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
2001-03-07 Ryan Yeske <rcyeske@cut.hotdog.tmp>
+ * main.c (read_rc_file): Fix typo that was resulting in exhausting
+ all memory parsing the rc file.
+
* actions.c (string_to_keysym): New function.
(parse_keydesc): Call string_to_keysym.
diff --git a/src/main.c b/src/main.c
index ee63f23..2d2c35f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -224,7 +224,7 @@ read_rc_file (FILE *file)
*line = '\0';
while (fgets (partial, n, file) != NULL)
{
- if ((strlen (line) + strlen (partial)) <= linesize)
+ if ((strlen (line) + strlen (partial)) >= linesize)
{
linesize *= 2;
line = (char*) xrealloc (line, linesize);