Package: gqcam
Version: 0.9.1-1
Severity: important
Tags: patch

        Hello,

I was browsing through gqcam code and saw this:

sprintf(savefile, "%s/.gqcamrc", getenv("HOME"));
preffile = fopen(savefile, "w");
save_pref_file(preffile, camera);

while savefile is a statically allocated buffer. gqcam is consequently
crashing in two cases:
- the environment variable HOME is not set;
- the opened file is not available for writing.

My patch also includes:
- a cosmetic change to the compilation process (debugging symbols +
  defines in config.h);
- the default video device set to "/dev/video0" instead of "/dev/video",
  which works better for me (I run devfs + linux 2.4).

I'd also like to point out there may be issues with threads handling
(from valgrind). I have also compiled it against Gtk+ 2.0: it didn't
work so well, but my intuition is it could help in the threads debugging
process.

HTH.

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.4.31
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages gqcam depends on:
ii  libc6              2.3.2.ds1-22          GNU C Library: Shared libraries an
ii  libglib1.2         1.2.10-9              The GLib library of C routines
ii  libgtk1.2          1.2.10-17             The GIMP Toolkit set of widgets fo
ii  libjpeg62          6b-10                 The Independent JPEG Group's JPEG 
ii  libpng12-0         1.2.8rel-1            PNG library - runtime
ii  libx11-6           4.3.0.dfsg.1-14sarge1 X Window System protocol client li
ii  libxext6           4.3.0.dfsg.1-14sarge1 X Window System miscellaneous exte
ii  libxi6             4.3.0.dfsg.1-14sarge1 X Window System Input extension li
ii  xlibs              4.3.0.dfsg.1-14sarge1 X Keyboard Extension (XKB) configu
ii  zlib1g             1:1.2.2-4.sarge.2     compression library - runtime

-- no debconf information

Attachment: gqcam.patch.gz
Description: Binary data

Reply via email to