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:
parent
c52930d11f
commit
6b84ecbf31
5 changed files with 42 additions and 18 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue