diff options
author | Stephen Warren <swarren@nvidia.com> | 2013-01-17 14:41:28 -0700 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2013-01-17 14:07:42 -0800 |
commit | acbfad4efb1922674ca1ec4e2e446c3ee5a19164 (patch) | |
tree | 2de12bf015002182950972b8158562eff7d67214 /data_layout.h | |
parent | 0bbfaf91d1bfdf1bebf884d100e874e4e6b16b6a (diff) | |
download | nvidia-cbootimage-acbfad4efb1922674ca1ec4e2e446c3ee5a19164.tar.gz |
Fix type of variable used to store fgetc() result
fgetc() returns an int. Fix process_config_file() to store the result in
an int, so that comparisons against EOF succeed.
Previously, If "char" defaulted to unsigned (which may be true for armhf),
then when fgetc() returned -1, it would be truncated to 255 when stored
in the char, and then zero-filled rather than sign-extended when comparing
against EOF, which would then fail.
See http://code.google.com/p/chromium-os/issues/detail?id=25632.
Reported-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Change-Id: I018e32df9a87b7c6f9fe24d108e091a7b31a50c8
Reviewed-on: http://git-master/r/192151
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Allen Martin <amartin@nvidia.com>
Diffstat (limited to 'data_layout.h')
0 files changed, 0 insertions, 0 deletions