s390/con3270: fix use of uninitialised data
[pandora-kernel.git] / drivers / s390 / char / con3270.c
index bb07577..8de9f29 100644 (file)
@@ -456,7 +456,7 @@ con3270_cline_end(struct con3270 *cp)
                s->string[s->len - 4] = TO_RA;
                s->string[s->len - 1] = 0;
        } else {
-               while (--size > cp->cline->len)
+               while (--size >= cp->cline->len)
                        s->string[size] = cp->view.ascebc[' '];
        }
        /* Replace cline with allocated line s and reset cline. */