projects
/
platform
/
upstream
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d43c57d
)
screensize: Dereference pointers when checking cols/rows
author
Matt Fleming
<matt.fleming@intel.com>
Tue, 27 Nov 2012 16:03:36 +0000
(16:03 +0000)
committer
Matt Fleming
<matt.fleming@intel.com>
Tue, 27 Nov 2012 20:48:33 +0000
(20:48 +0000)
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>
com32/lib/sys/screensize.c
patch
|
blob
|
history
diff --git
a/com32/lib/sys/screensize.c
b/com32/lib/sys/screensize.c
index
340227c
..
bcd4496
100644
(file)
--- 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;
}