Previous patch was incorrect, it includes a wrong null char test !!!
I'm attaching a correct version.
Thank you!


On Mon, Feb 10, 2014 at 6:24 PM, The default queue via RT 
<r...@openssl.org>wrote:

>
> Greetings,
>
> This message has been automatically generated in response to the
> creation of a trouble ticket regarding:
>         "ID1729",
> a summary of which appears below.
>
> There is no need to reply to this message right now.  Your ticket has been
> assigned an ID of [openssl.org #3261].
>
> Please include the string:
>
>          [openssl.org #3261]
>
> in the subject line of all future correspondence about this issue. To do
> so,
> you may reply to this message.
>
>                         Thank you,
>                         r...@openssl.org
>
> -------------------------------------------------------------------------
> This bug is still present in lastest release.
>
> Type: bug
> Version: openssl-1.0.1f
> Operating system: linux x86_64 ( +all )
>
>
>
> --
> --
> mdone
>
>


-- 
-- 
mdone

--- openssl-1.0.1f-a/crypto/x509/by_dir.c	2014-01-06 15:47:42.000000000 +0200
+++ openssl-1.0.1f-b/crypto/x509/by_dir.c	2014-02-10 16:22:02.890588523 +0200
@@ -226,7 +226,11 @@
 			ss=s;
 			s=p+1;
 			len=(int)(p-ss);
-			if (len == 0) continue;
+			if (len == 0) {
+				if ( *p == 0 )
+					break;
+				continue;
+			}
 			for (j=0; j < sk_BY_DIR_ENTRY_num(ctx->dirs); j++)
 				{
 				ent = sk_BY_DIR_ENTRY_value(ctx->dirs, j);
@@ -234,8 +238,11 @@
 				    strncmp(ent->dir,ss,(unsigned int)len) == 0)
 					break;
 				}
-			if (j < sk_BY_DIR_ENTRY_num(ctx->dirs))
+			if (j < sk_BY_DIR_ENTRY_num(ctx->dirs)) {
+				if ( *p == 0 )
+					break;
 				continue;
+			}
 			if (ctx->dirs == NULL)
 				{
 				ctx->dirs = sk_BY_DIR_ENTRY_new_null();

Reply via email to