Don't try to write a zero-length message
If the message history contains a zero-length message line, skip it, as trying to write a zero-length string will make bwrite panic. Happened only on X11. This is post-3.6.1 bug.
This commit is contained in:
@@ -1240,6 +1240,8 @@ int fd, mode;
|
||||
while ((msg = getmsghistory(init)) != 0) {
|
||||
init = FALSE;
|
||||
msglen = strlen(msg);
|
||||
if (msglen < 1)
|
||||
continue;
|
||||
/* sanity: truncate if necessary (shouldn't happen);
|
||||
no need to modify msg[] since terminator isn't written */
|
||||
if (msglen > BUFSZ - 1)
|
||||
|
||||
Reference in New Issue
Block a user