fixed segv in calls to pstrcpy() in cliprint.c
authorAndrew Tridgell <tridge@samba.org>
Wed, 23 Jul 2003 10:09:29 +0000 (10:09 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 23 Jul 2003 10:09:29 +0000 (10:09 +0000)
(This used to be commit 36bc2b99b4fec2c14f8471d89381b2d6c2f9d339)

source3/libsmb/cliprint.c

index bfa33bc5146ee10c434bd7084162ac899ed78eb4..f302c045a5d51537d2b18a70a151dfad666100fd 100644 (file)
@@ -65,16 +65,16 @@ int cli_print_queue(struct cli_state *cli,
        p = param;
        SSVAL(p,0,76);         /* API function number 76 (DosPrintJobEnum) */
        p += 2;
-       pstrcpy(p,"zWrLeh");   /* parameter description? */
+       pstrcpy_base(p,"zWrLeh", param);   /* parameter description? */
        p = skip_string(p,1);
-       pstrcpy(p,"WWzWWDDzz");  /* returned data format */
+       pstrcpy_base(p,"WWzWWDDzz", param);  /* returned data format */
        p = skip_string(p,1);
-       pstrcpy(p,cli->share);    /* name of queue */
+       pstrcpy_base(p,cli->share, param);    /* name of queue */
        p = skip_string(p,1);
        SSVAL(p,0,2);   /* API function level 2, PRJINFO_2 data structure */
        SSVAL(p,2,1000); /* size of bytes of returned data buffer */
        p += 4;
-       pstrcpy(p,"");   /* subformat */
+       pstrcpy_base(p,"", param);   /* subformat */
        p = skip_string(p,1);
 
        DEBUG(4,("doing cli_print_queue for %s\n", cli->share));
@@ -133,9 +133,9 @@ int cli_printjob_del(struct cli_state *cli, int job)
        p = param;
        SSVAL(p,0,81);          /* DosPrintJobDel() */
        p += 2;
-       pstrcpy(p,"W");
+       pstrcpy_base(p,"W", param);
        p = skip_string(p,1);
-       pstrcpy(p,"");
+       pstrcpy_base(p,"", param);
        p = skip_string(p,1);
        SSVAL(p,0,job);     
        p += 2;