termptyesc: fix handling of DECSLRM. Ref T5533

This commit is contained in:
Boris Faure 2017-06-05 23:53:07 +02:00
parent bbfa60120e
commit cc5fcac03d
1 changed files with 2 additions and 0 deletions

View File

@ -779,6 +779,8 @@ _handle_esc_csi_decslrm(Termpty *ty, Eina_Unicode **b)
DBG("DECSLRM (%d;%d) Set Left and Right Margins", left, right);
TERMPTY_RESTRICT_FIELD(left, 1, ty->w);
if (right < 1)
right = ty->w;
TERMPTY_RESTRICT_FIELD(right, 3, ty->w+1);
if (left >= right) goto bad;