mirror of https://github.com/FDOS/kernel.git
Fix pointer overflow problem for reading line using handle.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@671 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
bef6672954
commit
67ef543bae
|
@ -534,7 +534,7 @@ size_t read_line_handle(int sft_idx, size_t n, char FAR * bp)
|
|||
}
|
||||
}
|
||||
|
||||
if (inputptr > bufend - n)
|
||||
if (n > bufend - inputptr)
|
||||
n = bufend - inputptr;
|
||||
|
||||
fmemcpy(bp, inputptr, n);
|
||||
|
|
Loading…
Reference in New Issue