1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Replace use of variable-length-arrays.

* common/t-iobuf.c (main): Replace variable-length-array.
* g10/gpgcompose.c (mksubpkt_callback): Ditto.
(encrypted): Ditto.
* g10/t-stutter.c (log_hexdump): Ditto.
(oracle_test): Ditto.
* g10/tofu.c (get_policy): Ditto.  Use "%zu" for size_t.
* scd/app-openpgp.c (ecc_writekey): Replace variable-length-array.
Check for zero length OID_LEN.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2017-01-02 13:29:18 +01:00
parent c52930d11f
commit 6b84ecbf31
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
5 changed files with 42 additions and 18 deletions

View file

@ -362,10 +362,12 @@ main (int argc, char *argv[])
{
iobuf_t iobuf;
int rc;
char *content = "0123456789";
char content[] = "0123456789";
int n;
int c;
char buffer[strlen (content)];
char buffer[10];
assert (sizeof buffer == sizeof content - 1);
iobuf = iobuf_temp_with_content (content, strlen (content));
assert (iobuf);