This commit is contained in:
parent
bc6a690024
commit
0b66c70285
@ -1,22 +1,3 @@
|
||||
--- 1.7.x/random/unix/sha2.c 2021/07/02 11:07:15 1891197
|
||||
+++ 1.7.x/random/unix/sha2.c 2021/07/02 11:10:33 1891198
|
||||
@@ -425,7 +425,7 @@
|
||||
usedspace = freespace = 0;
|
||||
}
|
||||
|
||||
-void apr__SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
|
||||
+void apr__SHA256_Final(sha2_byte digest[SHA256_DIGEST_LENGTH], SHA256_CTX* context) {
|
||||
sha2_word32 *d = (sha2_word32*)digest;
|
||||
unsigned int usedspace;
|
||||
|
||||
@@ -496,7 +496,7 @@
|
||||
usedspace = 0;
|
||||
}
|
||||
|
||||
-char *apr__SHA256_End(SHA256_CTX* context, char buffer[]) {
|
||||
+char *apr__SHA256_End(SHA256_CTX* context, char buffer[SHA256_DIGEST_STRING_LENGTH]) {
|
||||
sha2_byte digest[SHA256_DIGEST_LENGTH], *d = digest;
|
||||
int i;
|
||||
|
||||
--- 1.7.x/time/unix/time.c 2021/07/02 11:07:15 1891197
|
||||
+++ 1.7.x/time/unix/time.c 2021/07/02 11:10:33 1891198
|
||||
@ -30,27 +11,4 @@
|
||||
/* shift new year to 1st March in order to make leap year calc easy */
|
||||
|
||||
if (xt->tm_mon < 2)
|
||||
--- 1.7.x/time/win32/time.c 2021/07/02 11:07:15 1891197
|
||||
+++ 1.7.x/time/win32/time.c 2021/07/02 11:10:33 1891198
|
||||
@@ -54,6 +54,9 @@ static void SystemTimeToAprExpTime(apr_t
|
||||
static const int dayoffset[12] =
|
||||
{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
|
||||
|
||||
+ if (tm->wMonth < 1 || tm->wMonth > 12)
|
||||
+ return APR_EBADDATE;
|
||||
+
|
||||
/* Note; the caller is responsible for filling in detailed tm_usec,
|
||||
* tm_gmtoff and tm_isdst data when applicable.
|
||||
*/
|
||||
@@ -228,6 +231,9 @@ APR_DECLARE(apr_status_t) apr_time_exp_g
|
||||
static const int dayoffset[12] =
|
||||
{306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275};
|
||||
|
||||
+ if (xt->tm_mon < 0 || xt->tm_mon >= 12)
|
||||
+ return APR_EBADDATE;
|
||||
+
|
||||
/* shift new year to 1st March in order to make leap year calc easy */
|
||||
|
||||
if (xt->tm_mon < 2)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user