Commit 3a9a036b882b4955b73f5fe87cf4ade16c0ac9ea
1 parent
135b3cef
Exists in
master
and in
3 other branches
Corrigindo problemas encontrados durante teste de uso da libhllapi em LibreOffice for windows
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
selection.c
... | ... | @@ -472,8 +472,11 @@ LIB3270_EXPORT char * lib3270_get_text(H3270 *h, int offset, int len) |
472 | 472 | } |
473 | 473 | |
474 | 474 | maxlen = (h->rows * (h->cols+1)) - offset; |
475 | - if(maxlen <= 0 || offset < 0) | |
475 | + if(maxlen <= 0 || offset < 0) | |
476 | + { | |
477 | + errno = EINVAL; | |
476 | 478 | return NULL; |
479 | + } | |
477 | 480 | |
478 | 481 | if(len < 0 || len > maxlen) |
479 | 482 | len = maxlen; | ... | ... |