Commit 38dd2742 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Tollef Fog Heen

Don't core dump on negative or execessively large fds in "order mode"

XXX: the 64k fd limitation should probably be fixed.
parent ca5859d1
......@@ -97,6 +97,10 @@ h_order(void *priv, enum VSL_tag_e tag, unsigned fd, unsigned len,
struct VSM_data *vd = priv;
/* XXX: Just ignore any fd not inside the bitmap */
if (fd >= sizeof bitmap / sizeof bitmap[0])
return (0);
bitmap[fd] |= bm;
type = (spec & VSL_S_CLIENT) ? 'c' :
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment