s3-svcctl: Fix _svcctl_EnumServicesStatusW (again).
authorGünther Deschner <gd@samba.org>
Wed, 8 Apr 2009 21:21:41 +0000 (23:21 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 8 Apr 2009 21:23:17 +0000 (23:23 +0200)
The final plan is to use the same macro based code that we have in spoolss to
handle the buffers and calculate the buffer-sizes.

Guenther

source3/rpc_server/srv_svcctl_nt.c

index ddfe0df10b9f1ff2ee67776d2e054d6527299a5e..1850dcb61295a7c5aa175a317ba4f091f1447be0 100644 (file)
@@ -466,9 +466,7 @@ WERROR _svcctl_EnumServicesStatusW(pipes_struct *p,
                }
 
                blob = ndr_push_blob(ndr);
-               if (blob.length >= r->in.offered) {
-                       memcpy(r->out.service, blob.data, r->in.offered);
-               }
+               memcpy(r->out.service, blob.data, r->in.offered);
        }
 
        *r->out.needed                  = (buffer_size > r->in.offered) ? buffer_size : r->in.offered;