diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-10-09 09:19:55 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-10-09 09:19:55 +0200 |
commit | 7ddeb3781f3d79ef1ae5a765a66f6cdd1ec113ef (patch) | |
tree | 3546836f27de4168559a62d8022626dfb101a133 /lib/ipmi_hpmfwupg.c | |
parent | 5bac665e38a15e6725f9ec17c7f7e80a0506aa08 (diff) | |
parent | 82ac6c87ce0b0af2fb8de25d70442fec406bb742 (diff) |
Merge tag 'upstream/1.8.18'
Upstream version 1.8.18
Diffstat (limited to 'lib/ipmi_hpmfwupg.c')
-rw-r--r-- | lib/ipmi_hpmfwupg.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/ipmi_hpmfwupg.c b/lib/ipmi_hpmfwupg.c index 9cbd4ff..bbcffc0 100644 --- a/lib/ipmi_hpmfwupg.c +++ b/lib/ipmi_hpmfwupg.c @@ -1399,7 +1399,12 @@ HpmfwupgGetBufferFromFile(char *imageFilename, return HPMFWUPG_ERROR; } /* Get the raw data in file */ - fseek(pImageFile, 0, SEEK_END); + ret = fseek(pImageFile, 0, SEEK_END); + if (ret != 0) { + lprintf(LOG_ERR, "Failed to seek in the image file '%s'", + imageFilename); + return HPMFWUPG_ERROR; + } pFwupgCtx->imageSize = ftell(pImageFile); pFwupgCtx->pImageData = malloc(sizeof(unsigned char)*pFwupgCtx->imageSize); if (pFwupgCtx->pImageData == NULL) { |