Re: [PATCH] krnl386.exe16: Fix NULL pointer dereferencing
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2015-03-27 um 19:16 schrieb Sergey Isakov:
This if statement body will perform only if driver_request is NULL pointer. Next statements will cause crash. Bug 38159 NULL pointer dereferencing <https://bugs.winehq.org/show_bug.cgi?id=38159> I think in this case the segfault is intentional. The caller passes a stupid parameter. Also I'm not sure if it actually segfaults. In vm86 mode memory is mapped to this page, so NULL may be a valid address.
The best solution would be to write a test and see what happens on an ancient DOS, but we don't have a test infrastructure for DOS and Win16. The next best idea might be to just remove the entire block. It's funny though since (according to git) the patch that added this check already added the "/* FIXME - to be deleted ?? */" comment. At some point we may as well remove the entire DOS code since we just call dosbox these days and 64 bit CPUs don't allow vm86 mode anyway. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJVFpBqAAoJEN0/YqbEcdMwVUQP/itrU95T4mlo2vo7f4J3k7fd Wx4goKV1/s5iPT+56T3q+MsqYp0gcNgmiwmVrf+HSNl94jXo1ysWfsuD1LeAAPGi O6FJBpszJdjw+fjm0whKidM3L+QYOEqGb/8AP5ZuXQ2zE0+iDA2cGo5oFrP2LpmM ZR7t3uYTIqk4VYWuZz4rlfSaHu552LpT/zEIYghteL/ANTqkad+oVleOFLB6Nbb/ j1PK7QKl6D+n6Kd2KSwlI9jj3XADf14i96J2knNh7yyLVZAsjNTe/3F9eoI98N5M cI22fGkW6jp70HoS1yMpJG66jqrhamAi6QBzMUI2cfAhHtjngKj36X3MRZMXIiK7 4E1g/Z7hcJ3ZtbrfzHnUdUXCQMXHszA93U69QRERTnjatDB+VNTZ67AaPGMXBiE9 2i5KlGg5TXjZPJwPqetHuGZ18uUXwCXfbC5+VPXP5AqbhxltE6IPfbKs95Bo90gh EvZsooU7pqNJxNAfscDIKliDsIcFV3TATqEyr/LCeczKNbE1DOKQ/afBrGyivabe f/YzcLLHfx5x8Lxx5bsmn2+3xR+LVfppH/rCSC5YA2ZwU6gB8NeuDAHh/BvsV7E1 i9IkN43sbQ4xZQFckBsyhdcpJd0kCCp3n1kmCfCWx3c2uIwLNvzzwT9HM8mY36my qcBfCcz1CCOpKpaayCSL =78sc -----END PGP SIGNATURE-----
participants (1)
-
Stefan Dösinger