[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RP] Bug in editor.c?
From: |
alex |
Subject: |
[RP] Bug in editor.c? |
Date: |
Sat, 4 Feb 2006 20:12:34 +0100 |
User-agent: |
Mutt/1.5.11 |
hi all,
i think i found a bug in editor.c.
I got random segfaults on my boxes, patch is self explanatory.
greets
-alex
===================================================================
RCS file: /sources/ratpoison/ratpoison/src/editor.c,v
retrieving revision 1.13
diff -u -r1.13 editor.c
--- src/editor.c 13 Jun 2005 21:38:14 -0000 1.13
+++ src/editor.c 4 Feb 2006 18:41:59 -0000
@@ -454,7 +454,7 @@
line->buffer = xrealloc (line->buffer, line->size);
}
- for (i = line->length + nbytes; i > line->position; i--)
+ for (i = line->length + nbytes; i > line->position && i >= nbytes; i--)
line->buffer[i] = line->buffer[i - nbytes];
strncpy (&line->buffer[line->position], keysym_buf, nbytes);
- [RP] Bug in editor.c?,
alex <=