Bug 153382 - security/apg: apg -y generates segfault
Summary: security/apg: apg -y generates segfault
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Peter Pentchev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-22 22:30 UTC by David Boyd
Modified: 2010-12-23 12:57 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Boyd 2010-12-22 22:30:11 UTC
apg -y results in segfault.

This appears to be identical to Debian bug #337116 which describes character buffer "salt" as being one byte too small.

I modified apg.c from "char salt[10];" to "char salt[11];" and output appears to be correct.

This problem does not occur with 6.4-RELEASE-p11, but does occur with 8.1-RELEASE-p2.

Fix: 

See above description.
How-To-Repeat: install port security/apg.

run "apg -d -y -n1".
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2010-12-22 23:32:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->roam

Fix synopsis and assign.
Comment 2 dfilter service freebsd_committer 2010-12-23 10:54:50 UTC
roam        2010-12-23 10:54:46 UTC

  FreeBSD ports repository

  Modified files:
    security/apg         Makefile distinfo 
    security/apg/files   patch-aa 
  Added files:
    security/apg/files   patch-apg.c 
  Log:
  Fix a segfault when using the -y option.  While I'm here:
  - remove the MD5 checksum from the distfile
  - note upstream's BSD license
  - OPTIONSify the support for CrackLib
  - add a descriptive patch header to the existing patch-aa
  - remove the packetstorm master site, it only seems to carry a much
    older version of apg
  - bump PORTREVISION for the segfault fix
  
  PR:             153382 (the segfault fix)
  Submitted by:   David Boyd <David.Boyd@insightbb.com>
  
  Revision  Changes    Path
  1.10      +8 -3      ports/security/apg/Makefile
  1.8       +0 -1      ports/security/apg/distinfo
  1.6       +9 -2      ports/security/apg/files/patch-aa
  1.1       +17 -0     ports/security/apg/files/patch-apg.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Peter Pentchev freebsd_committer 2010-12-23 12:57:00 UTC
State Changed
From-To: open->closed

This should be fixed in the just-committed apg-2.3.0b_2. 
Thanks for bringing it up!