• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン

external/efibootmgr


Commit MetaInfo

Revision2e018c08b92c800961ec010a6a4eeb34e8f3faa0 (tree)
Zeit2017-05-10 05:47:07
AutorPeter Jones <pjones@redh...>
CommiterPeter Jones

Log Message

make_linux_load_option(): check data_size correctly.

Coverity noticed that we're not checking data_size for NULLness before
dereferencing it to pass the value to efi_loadopt_create(). So now we
pass a temporary variable and assign it only if it's non-NULL.

Signed-off-by: Peter Jones <pjones@redhat.com>

Ändern Zusammenfassung

Diff

--- a/src/efi.c
+++ b/src/efi.c
@@ -397,7 +397,10 @@ make_linux_load_option(uint8_t **data, size_t *data_size,
397397 }
398398 }
399399
400- needed = efi_loadopt_create(*data, *data_size,
400+ size_t data_size_tmp = 0;
401+ if (data_size)
402+ data_size_tmp = *data_size;
403+ needed = efi_loadopt_create(*data, data_size_tmp,
401404 attributes, dp, needed, opts.label,
402405 optional_data, optional_data_size);
403406 if (dp) {