Typo in ms\uplink.c in openssl-0.9.8b

If the static 'applinktable' is already initialized, the block which
sets the local 'p' is not executed. After this block, 'applinktable'
should be used to lookup the max index and the function address.

Curiously, this doesn't cause problems when compiled with VC8 /MD.
It causes access violations when compiled with the static C runtime
library - /MT.

Patch follows.


Index: ms/uplink.c
================================================== =================
--- ms/uplink.c (revision 1)
+++ ms/uplink.c (working copy)
@@ -72,10 +72,10 @@
applinktable = p;

- if (index > (int)p[0])
+ if (index > (int)applinktable[0])

- if (p[index]) func = p[index];
+ if (applinktable[index]) func = applinktable[index];
} while (0);

table[index] = func;
__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager majordomo@openssl.org