Trivial sprintf to snprintf conversion. Some linkers warn about unbounded sprintf...
authorJanne Johansson <janne.johansson@safespring.com>
Fri, 19 Oct 2018 07:12:07 +0000 (09:12 +0200)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Wed, 31 Oct 2018 06:39:21 +0000 (02:39 -0400)
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
tests/test_opus_encode.c

index dae49c3..5e2e571 100644 (file)
@@ -236,7 +236,7 @@ void fuzz_encoder_settings(const int num_encoders, const int num_setting_changes
          int frame_size_enum = get_frame_size_enum(frame_size, sampling_rate);
          force_channel = IMIN(force_channel, num_channels);
 
-         sprintf(debug_info,
+         snprintf(debug_info, sizeof(debug_info),
                  "fuzz_encoder_settings: %d kHz, %d ch, application: %d, "
                  "%d bps, force ch: %d, vbr: %d, vbr constraint: %d, complexity: %d, "
                  "max bw: %d, signal: %d, inband fec: %d, pkt loss: %d%%, lsb depth: %d, "