diff options
author | Matt Fleming <matt.fleming@intel.com> | 2012-11-27 16:03:36 +0000 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2012-11-27 20:48:33 +0000 |
commit | 4a08db73026a67c8979126008f7801a02ac1647e (patch) | |
tree | d30a4d5936856a3b12522d1f610a0d16c457e5cd | |
parent | d43c57d945f42dd0dbaca747a646a769e49082da (diff) | |
download | syslinux-4a08db73026a67c8979126008f7801a02ac1647e.tar.gz syslinux-4a08db73026a67c8979126008f7801a02ac1647e.tar.xz syslinux-4a08db73026a67c8979126008f7801a02ac1647e.zip |
screensize: Dereference pointers when checking cols/rows
Dereference 'rows' and 'cols' to check whether the data they point to
is zero, which would indicate the screen size is bogus, instead of
checking if they point to NULL.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r-- | com32/lib/sys/screensize.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/lib/sys/screensize.c b/com32/lib/sys/screensize.c index 340227cd..bcd4496c 100644 --- a/com32/lib/sys/screensize.c +++ b/com32/lib/sys/screensize.c @@ -14,7 +14,7 @@ int getscreensize(int fd, int *rows, int *cols) *rows = fp->o.rows; *cols = fp->o.cols; - if (!rows || !cols) { + if (!*rows || !*cols) { errno = ENOTTY; return -1; } |