Skip to content

Commit

Permalink
mbedtls/aes.c: Fix whitespace errors introduced during code import
Browse files Browse the repository at this point in the history
The mbedtls files use spaces instead of tabs. Also adds that knowledge
to editorconfig so I don't make the mistake again.
  • Loading branch information
magnumripper committed Dec 18, 2024
1 parent 340f436 commit 1959c1e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ tab_width = 8
indent_style = space
indent_size = 2

# Neither does mbedtls
[src/mbedtls/*.[ch]]
indent_style = space
indent_size = 4

[7z2john.pl]
indent_style = space
indent_size = 2
Expand Down
14 changes: 7 additions & 7 deletions src/mbedtls/aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1102,13 +1102,13 @@ int mbedtls_aes_crypt_cbc(mbedtls_aes_context *ctx,
}

if (length % 16) {
ret = MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH;
/*
* For bug compatibility, chug along and return the error afterwards.
* Our old code (and eg. OpenSSL) would read and write past buffers
* just like we do here. - magnum
*/
length = (length + 15) / 16 * 16;
ret = MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH;
/*
* For bug compatibility, chug along and return the error afterwards.
* Our old code (and eg. OpenSSL) would read and write past buffers
* just like we do here. - magnum
*/
length = (length + 15) / 16 * 16;
}

#if defined(MBEDTLS_VIA_PADLOCK_HAVE_CODE)
Expand Down

0 comments on commit 1959c1e

Please sign in to comment.