File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -13062,20 +13062,26 @@ int wolfSSL_EVP_DecodeUpdate(WOLFSSL_EVP_ENCODE_CTX* ctx,
1306213062 return 1 ;
1306313063
1306413064 }
13065- /* if the last data is '\n', remove it */
13066- c = in [j - 1 ];
13067- if (c == '\n' ) {
13068- c = (in [j - 2 ]);
13065+ /* If the last data is '\n', remove it */
13066+ if (j > 0 ) {
13067+ c = in [j - 1 ];
13068+ if (c == '\n' && (j > 1 )) {
13069+ c = (in [j - 2 ]);
13070+ if (c == '=' )
13071+ return 0 ;
13072+ else
13073+ return 1 ;
13074+ } else if (c == '\n' ) {
13075+ return 1 ;
13076+ }
1306913077 if (c == '=' )
1307013078 return 0 ;
1307113079 else
1307213080 return 1 ;
1307313081 }
13074- if (c == '=' )
13075- return 0 ;
13076- else
13077- return 1 ;
1307813082
13083+ /* j == 0 */
13084+ return 1 ;
1307913085}
1308013086/* wolfSSL_EVP_DecodeFinal decode remaining data in ctx
1308113087 * to outputs to out.
You can’t perform that action at this time.
0 commit comments