Преглед изворни кода

Fix MSVC build.

The difference of two pointers is signed, even though it's always
non-negative here, so MSVC is complaining about signedness mismatch.

Change-Id: I5a042d06ed348540706b93310af3f60f3ab5f303
Reviewed-on: https://boringssl-review.googlesource.com/5766
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin пре 9 година
committed by Adam Langley
родитељ
комит
a1fadd399f
1 измењених фајлова са 2 додато и 2 уклоњено
  1. +2
    -2
      ssl/tls_record.c

+ 2
- 2
ssl/tls_record.c Прегледај датотеку

@@ -314,8 +314,8 @@ int tls_seal_record(SSL *ssl, uint8_t *out, size_t *out_len, size_t max_out,
}
/* Ensure |do_seal_record| does not write beyond |in[0]|. */
size_t frag_max_out = max_out;
if (out <= in + 1 && (in + 1) - out < frag_max_out) {
frag_max_out = (in + 1) - out;
if (out <= in + 1 && in + 1 < out + frag_max_out) {
frag_max_out = (size_t)(in + 1 - out);
}
if (!do_seal_record(ssl, out, &frag_len, frag_max_out, type, in, 1)) {
return 0;


Loading…
Откажи
Сачувај