From: Scott James Remnant Date: Thu, 6 May 2004 22:51:59 +0000 (+0000) Subject: Fix very silly segfault. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7a0477f97bb4851d9a26682a22f8bc29389cf34;p=dpkg Fix very silly segfault. --- diff --git a/ChangeLog b/ChangeLog index 41d3a580..cae048ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu May 6 23:50:17 BST 2004 Daniel Kobras + + * main/enquiry.c: Remove dereference of unitialised and unused pointer + variable, fixing segfault on when "gcc -dumpmachine" returns a + non-matching triplet. + Thu May 6 23:44:55 BST 2004 Colin Watson * dselect/helpmsgs.cc: Pressing 'n' repeats the last search, not diff --git a/debian/changelog b/debian/changelog index e6d1821a..6e16abcb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ dpkg (1.10.22) unstable; urgency=low properly again. Closes: #246595. * Make dpkg-scanpackages output Origin and Bugs fields with proper casing. Closes: #154422. + * Fix segfault when "gcc -dumpmachine" returns a non-matching triplet. + Closes: #211850. * Correct 'n' and 'p' key descriptions in dselect help message. Closes: #120562. * Stop hardcoding the list of manual page languages in debian/rules, diff --git a/main/enquiry.c b/main/enquiry.c index a8a8b762..c6aa1872 100644 --- a/main/enquiry.c +++ b/main/enquiry.c @@ -402,7 +402,7 @@ void printarch(const char *const *argv) { FILE *ccpipe; struct varbuf vb; ptrdiff_t ll; - char *p, *q; + char *p; if (*argv) badusage(_("--print-architecture does not take any argument")); @@ -445,7 +445,7 @@ void printarch(const char *const *argv) { default: internerr("unknown action in printarch"); } if (!arch) { - *q= 0; arch= p; + arch= p; fprintf(stderr, _("dpkg: warning, architecture `%s' not in remapping table\n"),arch); } if (printf("%s\n",arch) == EOF) werr("stdout");