libwebpmux.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From 47d3532459863e3b0bc1c7fd3a200f612863c814 Mon Sep 17 00:00:00 2001
  2. From: Rico Tzschichholz <ricotz@ubuntu.com>
  3. Date: Sat, 14 Sep 2019 20:03:47 +0200
  4. Subject: [PATCH] libwepmix: Fix use of possibly unassigned local variable
  5. 'data'
  6. ---
  7. src/libwebpmux.vapi | 8 ++------
  8. 1 file changed, 2 insertions(+), 6 deletions(-)
  9. diff --git a/src/libwebpmux.vapi b/src/libwebpmux.vapi
  10. index f2461a2..42d2886 100644
  11. --- a/src/libwebpmux.vapi
  12. +++ b/src/libwebpmux.vapi
  13. @@ -61,9 +61,7 @@ namespace WebP
  14. [CCode (cname = "vala_set_image")]
  15. public MuxError set_image (uint8[] bitstream, bool copy_data)
  16. {
  17. - Data data;
  18. - data.bytes = bitstream;
  19. - data.size = bitstream.length;
  20. + Data data = { bitstream, bitstream.length };
  21. return _set_image (data, copy_data);
  22. }
  23. @@ -89,9 +87,7 @@ namespace WebP
  24. public MuxError set_chunk (string fourcc, uint8[] chunk_data, bool copy_data)
  25. requires (fourcc.length == 4)
  26. {
  27. - Data data;
  28. - data.bytes = chunk_data;
  29. - data.size = chunk_data.length;
  30. + Data data = { chunk_data ,chunk_data.length };
  31. return _set_chunk ((uchar[]) fourcc, data, copy_data);
  32. }
  33. --
  34. 2.22.0