~nvalcarcel/ubuntu/lucid/openssl/openssl-merge

« back to all changes in this revision

Viewing changes to debian/patches/CVE-2009-1387.patch

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-08-11 21:19:18 UTC
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090811211918-q52b1berxicp30hh
* Split all the patches into a separate files
* Stop undefinging HZ, the issue on alpha should be fixed.
* Remove MD2 from digest algorithm table.  (CVE-2009-2409) (Closes: #539899)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: openssl-0.9.8k/ssl/d1_both.c
 
2
===================================================================
 
3
--- openssl-0.9.8k.orig/ssl/d1_both.c   2009-07-19 11:32:41.000000000 +0200
 
4
+++ openssl-0.9.8k/ssl/d1_both.c        2009-07-19 11:32:41.000000000 +0200
 
5
@@ -585,30 +585,31 @@
 
6
                        }
 
7
                }
 
8
 
 
9
-       frag = dtls1_hm_fragment_new(frag_len);
 
10
-       if ( frag == NULL)
 
11
-               goto err;
 
12
+       if (frag_len)
 
13
+       {
 
14
+               frag = dtls1_hm_fragment_new(frag_len);
 
15
+               if ( frag == NULL)
 
16
+                       goto err;
 
17
 
 
18
-       memcpy(&(frag->msg_header), msg_hdr, sizeof(*msg_hdr));
 
19
+               memcpy(&(frag->msg_header), msg_hdr, sizeof(*msg_hdr));
 
20
 
 
21
-       if (frag_len)
 
22
-               {
 
23
-               /* read the body of the fragment (header has already been read */
 
24
+               /* read the body of the fragment (header has already been read) */
 
25
                i = s->method->ssl_read_bytes(s,SSL3_RT_HANDSHAKE,
 
26
                        frag->fragment,frag_len,0);
 
27
                if (i<=0 || (unsigned long)i!=frag_len)
 
28
                        goto err;
 
29
-               }
 
30
 
 
31
-       pq_64bit_init(&seq64);
 
32
-       pq_64bit_assign_word(&seq64, msg_hdr->seq);
 
33
+               pq_64bit_init(&seq64);
 
34
+               pq_64bit_assign_word(&seq64, msg_hdr->seq);
 
35
 
 
36
-       item = pitem_new(seq64, frag);
 
37
-       pq_64bit_free(&seq64);
 
38
-       if ( item == NULL)
 
39
-               goto err;
 
40
+               item = pitem_new(seq64, frag);
 
41
+               pq_64bit_free(&seq64);
 
42
+               if ( item == NULL)
 
43
+                       goto err;
 
44
+
 
45
+               pqueue_insert(s->d1->buffered_messages, item);
 
46
+       }
 
47
 
 
48
-       pqueue_insert(s->d1->buffered_messages, item);
 
49
        return DTLS1_HM_FRAGMENT_RETRY;
 
50
 
 
51
 err: