aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2010-10-12 17:14:00 +0200
committerRickard Green <[email protected]>2010-10-12 20:27:20 +0200
commit449f8cb91c0b65f83980a833d50d34111a8f038e (patch)
tree2ed2cd2ae769854033c946c68af686db0848c45a /erts/emulator
parent17224a3d31d25ce6daa4de63b52b26bee9564bcd (diff)
downloadotp-449f8cb91c0b65f83980a833d50d34111a8f038e.tar.gz
otp-449f8cb91c0b65f83980a833d50d34111a8f038e.tar.bz2
otp-449f8cb91c0b65f83980a833d50d34111a8f038e.zip
Fix erl_drv_tsd_get() and enif_tsd_get()
A bug in erl_drv_tsd_get() and enif_tsd_get() could cause an emulator crash. These functions are currently not used in OTP. That is, the crash only occur on systems with user implemented NIF libraries or drivers that use one of these functions.
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/beam/erl_drv_thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_drv_thread.c b/erts/emulator/beam/erl_drv_thread.c
index d42820ddf3..17b08a71d4 100644
--- a/erts/emulator/beam/erl_drv_thread.c
+++ b/erts/emulator/beam/erl_drv_thread.c
@@ -528,7 +528,7 @@ erl_drv_tsd_get(ErlDrvTSDKey key)
if (!dtid)
return NULL;
#endif
- if (ERL_DRV_TSD_LEN__ < key)
+ if (ERL_DRV_TSD_LEN__ <= key)
return NULL;
return ERL_DRV_TSD__[key];
}