Yo All!

The Linux kernel has now removed all Varible Length Arrays (VLAs).

Linux has spoke:

"USING VLA'S IS ACTIVELY STUPID! It generates much more code, and much
_slower_ code (and more fragile code), than just using a fixed key size
would have done."

It is easy to find where VLAs are used, just add the -Wvla cflag.

# export CGLAG=-Wvla

Then build as usual.

Looks like git head NTPsec has two VLAs:

[180/273] Compiling tests/libntp/ymd2yd.c
../../tests/libntp/macencrypt.c: In function 'TEST_macencrypt_Encrypt_':
../../tests/libntp/macencrypt.c:34:2: warning: ISO C90 forbids array 'packetPtr'
 whose size can't be evaluated [-Wvla]
  char packetPtr[totalLength];
  ^~~~
../../tests/libntp/macencrypt.c: In function 'TEST_macencrypt_CMAC_Encrypt_':
../../tests/libntp/macencrypt.c:70:2: warning: ISO C90 forbids array 
'packetPtr' whose size can't be evaluated [-Wvla]
  char packetPtr[totalLength];
  ^~~~

Should be easy to fix.  Anyone want to try?


RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        g...@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin

Attachment: pgp8MNrgCuATB.pgp
Description: OpenPGP digital signature

_______________________________________________
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel

Reply via email to