summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_parse/parse_prs.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index d549265fa1..1332a8311a 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -361,13 +361,10 @@ uint32 prs_offset(prs_struct *ps)
bool prs_set_offset(prs_struct *ps, uint32 offset)
{
- if(offset <= ps->data_offset) {
- ps->data_offset = offset;
- return True;
- }
-
- if(!prs_grow(ps, offset - ps->data_offset))
+ if ((offset > ps->data_offset)
+ && !prs_grow(ps, offset - ps->data_offset)) {
return False;
+ }
ps->data_offset = offset;
return True;