diff options
author | jsing <> | 2014-06-13 12:41:01 +0000 |
---|---|---|
committer | jsing <> | 2014-06-13 12:41:01 +0000 |
commit | 85307e4b097e3e481923a2153687f1f420145ec8 (patch) | |
tree | ce17ffa91e4eed5edcc7d7ea7db846ea48ea3d10 | |
parent | 180e6a8c04e46f1d6ee66dace2f5340c553c9d4c (diff) | |
download | openbsd-85307e4b097e3e481923a2153687f1f420145ec8.tar.gz openbsd-85307e4b097e3e481923a2153687f1f420145ec8.tar.bz2 openbsd-85307e4b097e3e481923a2153687f1f420145ec8.zip |
Use SSL3_SEQUENCE_SIZE and if we're going to preincrement we may as well
do it properly.
-rw-r--r-- | src/lib/libssl/src/ssl/s3_enc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libssl/src/ssl/s3_enc.c b/src/lib/libssl/src/ssl/s3_enc.c index ed463ef38c..d0501499a2 100644 --- a/src/lib/libssl/src/ssl/s3_enc.c +++ b/src/lib/libssl/src/ssl/s3_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_enc.c,v 1.40 2014/06/12 15:49:31 deraadt Exp $ */ | 1 | /* $OpenBSD: s3_enc.c,v 1.41 2014/06/13 12:41:01 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -793,9 +793,8 @@ ssl3_record_sequence_update(unsigned char *seq) | |||
793 | { | 793 | { |
794 | int i; | 794 | int i; |
795 | 795 | ||
796 | for (i = 7; i >= 0; i--) { | 796 | for (i = SSL3_SEQUENCE_SIZE - 1; i >= 0; i--) { |
797 | ++seq[i]; | 797 | if (++seq[i] != 0) |
798 | if (seq[i] != 0) | ||
799 | break; | 798 | break; |
800 | } | 799 | } |
801 | } | 800 | } |