~ubuntu-branches/debian/jessie/hplip/jessie

« back to all changes in this revision

Viewing changes to prnt/hpijs/hpijs.cpp

  • Committer: Package Import Robot
  • Author(s): Sebastian Ramacher
  • Date: 2013-03-01 18:21:48 UTC
  • Revision ID: package-import@ubuntu.com-20130301182148-46ow55ebyvmzuk87
Tags: 3.12.6-3.1
* Non-maintainer upload.
* debian/patches/CVE-2013-0200.patch: Fix CVE-2013-0200 by applying the
  patch from Red Hat. Additionally increase the buffers to mitigate an
  regression and a buffer overflow. (Closes: #701185)

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
 
97
97
    if (pSS->m_iLogLevel & SAVE_PCL_FILE)
98
98
    {
 
99
        int     fd;
99
100
        char    szFileName[32];
100
 
        sprintf (szFileName, "/tmp/hpijs_%d.out", getpid());
101
 
        pSS->outfp = fopen (szFileName, "w");
102
 
        if (pSS->outfp)
103
 
        {
104
 
            chmod (szFileName, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
105
 
        }
 
101
        sprintf (szFileName, "/tmp/hpijs_%d.out.XXXXXX", getpid());
 
102
        fd = mkstemp (szFileName);
 
103
        if (fd != -1)
 
104
            pSS->outfp = fdopen (fd, "w");
106
105
    }
107
106
}
108
107