Author: kkolinko Date: Wed Jul 2 08:26:00 2014 New Revision: 1607285 URL: http://svn.apache.org/r1607285 Log: For https://issues.apache.org/bugzilla/show_bug.cgi?id=55938 Fix "Dereference of null pointer" issues identified by clang-analyzer, in "jbs_read", "jbs_write". Merged r1607278 from tomcat/native/trunk. Not tested, but an obvious fix.
Modified: tomcat/native/branches/1.1.x/ (props changed) tomcat/native/branches/1.1.x/native/src/ssl.c tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml Propchange: tomcat/native/branches/1.1.x/ ------------------------------------------------------------------------------ Merged /tomcat/native/trunk:r1607278 Modified: tomcat/native/branches/1.1.x/native/src/ssl.c URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/ssl.c?rev=1607285&r1=1607284&r2=1607285&view=diff ============================================================================== --- tomcat/native/branches/1.1.x/native/src/ssl.c (original) +++ tomcat/native/branches/1.1.x/native/src/ssl.c Wed Jul 2 08:26:00 2014 @@ -884,8 +884,8 @@ static int jbs_write(BIO *b, const char if (b->init && in != NULL) { BIO_JAVA *j = (BIO_JAVA *)b->ptr; JNIEnv *e = NULL; - jbyteArray jb = (*e)->NewByteArray(e, inl); tcn_get_java_env(&e); + jbyteArray jb = (*e)->NewByteArray(e, inl); if (!(*e)->ExceptionOccurred(e)) { (*e)->SetByteArrayRegion(e, jb, 0, inl, (jbyte *)in); ret = (*e)->CallIntMethod(e, j->cb.obj, @@ -903,8 +903,8 @@ static int jbs_read(BIO *b, char *out, i if (b->init && out != NULL) { BIO_JAVA *j = (BIO_JAVA *)b->ptr; JNIEnv *e = NULL; - jbyteArray jb = (*e)->NewByteArray(e, outl); tcn_get_java_env(&e); + jbyteArray jb = (*e)->NewByteArray(e, outl); if (!(*e)->ExceptionOccurred(e)) { ret = (*e)->CallIntMethod(e, j->cb.obj, j->cb.mid[1], jb); Modified: tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml?rev=1607285&r1=1607284&r2=1607285&view=diff ============================================================================== --- tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml Wed Jul 2 08:26:00 2014 @@ -39,6 +39,10 @@ <section name="Changes between 1.1.30 and 1.1.31"> <changelog> <fix> + <bug>55938</bug>: Fix "Dereference of null pointer" issues in rarely + used methods in ssl.c, as identified by clang-analyzer. (kkolinko) + </fix> + <fix> <bug>56396</bug>: Do not create RSA keys shorter the 1024 bits if inside FIPS mode. (mturk) </fix> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org