Code Review
/
staging
/
windowmanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
main: appid and surfaceid in register_surface are unsigned
[staging/windowmanager.git]
/
src
/
main.cpp
diff --git
a/src/main.cpp
b/src/main.cpp
index
d4da785
..
4593f22
100644
(file)
--- a/
src/main.cpp
+++ b/
src/main.cpp
@@
-246,15
+246,15
@@
void register_surface(afb_req req) {
return;
}
return;
}
- int32_t appid = json_object_get_int(jappid);
- int32_t surfid = json_object_get_int(jsurfid);
+
u
int32_t appid = json_object_get_int(jappid);
+
u
int32_t surfid = json_object_get_int(jsurfid);
- if (appid
< 0 || appid
> 0xff) {
+ if (appid > 0xff) {
afb_req_fail(req, "failed", "invalid appid");
return;
}
afb_req_fail(req, "failed", "invalid appid");
return;
}
- if (surfid
< 0 || surfid
> 0xffff) {
+ if (surfid > 0xffff) {
afb_req_fail(req, "failed", "invalid surfaceid");
return;
}
afb_req_fail(req, "failed", "invalid surfaceid");
return;
}