diff --git a/ChangeLog b/ChangeLog index a028ad5fa..d1cb2589f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,9 @@ * miext/cw/cw.c: Coverity #337: Remove useless NULL check. + * hw/xfree86/loader/loader.c: + Coverity #484: Fix an off-by-one in module refcounting. + 2006-03-15 Benjamin Herrenschmidt * hw/xfree86/dri/dri.c: (DRIExtensionInit): diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c index 315926b18..aed5a541b 100644 --- a/hw/xfree86/loader/loader.c +++ b/hw/xfree86/loader/loader.c @@ -1446,7 +1446,7 @@ LoaderUnload(int handle) loaderRec fakeHead; loaderPtr tmp = &fakeHead; - if (handle < 0 || handle > MAX_HANDLE) + if (handle < 0 || handle >= MAX_HANDLE) return -1; /*