summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--librpc/gen_ndr/eventlog.h2
-rw-r--r--librpc/gen_ndr/ndr_eventlog.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/librpc/gen_ndr/eventlog.h b/librpc/gen_ndr/eventlog.h
index 9c9a2ed218..65178d203c 100644
--- a/librpc/gen_ndr/eventlog.h
+++ b/librpc/gen_ndr/eventlog.h
@@ -47,7 +47,7 @@ struct eventlog_Record {
time_t time_written;
uint32_t event_id;
enum eventlogEventTypes event_type;
- uint16_t num_of_strings;/* [range(0,256)] */
+ uint16_t num_of_strings;/* [max(256)] */
uint16_t event_category;
uint16_t reserved_flags;
uint32_t closing_record_number;
diff --git a/librpc/gen_ndr/ndr_eventlog.c b/librpc/gen_ndr/ndr_eventlog.c
index 9b64deb58f..edcdf2e3f4 100644
--- a/librpc/gen_ndr/ndr_eventlog.c
+++ b/librpc/gen_ndr/ndr_eventlog.c
@@ -180,7 +180,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_eventlog_Record(struct ndr_pull *ndr, int nd
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->event_id));
NDR_CHECK(ndr_pull_eventlogEventTypes(ndr, NDR_SCALARS, &r->event_type));
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_of_strings));
- if (r->num_of_strings < 0 || r->num_of_strings > 256) {
+ if (r->num_of_strings > 256) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->event_category));