From 3e1c1a526f345ece66775c178b4f008c355c2440 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Tue, 13 Apr 2004 11:11:09 +0000 Subject: [PATCH] AllocateHMASpace needs to check FP_SEG(firstbuf) for 0xffff, since the buffers may not live in the HMA. git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@872 6ac86273-5f31-0410-b378-82cca8765d1b --- kernel/blockio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/blockio.c b/kernel/blockio.c index 89a8d87..9a66fad 100644 --- a/kernel/blockio.c +++ b/kernel/blockio.c @@ -477,8 +477,12 @@ UWORD dskxfer(COUNT dsk, ULONG blkno, VOID FAR * buf, UWORD numblocks, void AllocateHMASpace (size_t lowbuffer, size_t highbuffer) { REG struct buffer FAR *bp = firstbuf; - int n = LoL_nbuffers; + int n; + if (FP_SEG(bp) != 0xffff) + return; + + n = LoL_nbuffers; do { /* check if buffer intersects with requested area */