[ros-dev] [ros-diffs] [aandrejevic] 67340: [NTVDM] Implement basic XMS functions.
Pierre Schweitzer
pierre at reactos.org
Wed Apr 22 06:43:52 UTC 2015
On 22/04/2015 05:10, aandrejevic at svn.reactos.org wrote:
> +static inline PXMS_HANDLE GetHandleRecord(WORD Handle)
> +{
> + PXMS_HANDLE Entry = &HandleTable[Handle - 1];
> + if (Handle == 0 || Handle >= XMS_MAX_HANDLES) return NULL;
> +
> + return Entry->Size ? Entry : NULL;
> +}
This looks highly dangerous to me and likely compiler dependent.
I'd rather perform the sanity checks before ever touching HandleTable,
especially because the value of Handle is coming right from caller
registers and have never been sanitized before.
--
Pierre Schweitzer <pierre at reactos.org>
System & Network Administrator
Senior Kernel Developer
ReactOS Deutschland e.V.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3940 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.reactos.org/pipermail/ros-dev/attachments/20150422/fbfdf019/attachment.bin>
More information about the Ros-dev
mailing list