Bug 227101 - misc/wmcalendar: fix three uninitialized bss variables
Summary: misc/wmcalendar: fix three uninitialized bss variables
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Tobias Kortkamp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-30 06:16 UTC by crahman
Modified: 2019-01-17 14:11 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (xride)


Attachments
misc/wmcalendar/files patch to properly initialize variables. (394 bytes, text/plain)
2018-03-30 06:16 UTC, crahman
no flags Details
Fix array-out-of-bounds error. (438 bytes, patch)
2018-10-21 19:00 UTC, crahman
tobik: maintainer-approval? (xride)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description crahman 2018-03-30 06:16:17 UTC
Created attachment 191968 [details]
misc/wmcalendar/files patch to properly initialize variables.

There are three uninitialized bss variables that the current compiler does not zero.  This causes the application to fail.

The attached patch for the files directory corrects the problem.
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2018-10-21 13:20:12 UTC
(In reply to crahman from comment #0)
> There are three uninitialized bss variables

Global variables are already initialized to zero. I don't think this is right.
Comment 2 crahman 2018-10-21 19:00:29 UTC
Created attachment 198442 [details]
Fix array-out-of-bounds error.

Correct loop iteration limits on an array manipulation.
Comment 3 crahman 2018-10-21 19:07:05 UTC
This problem arose when lldb was imported into the base system, and at the time the debugger didn't work and I attributed the problem to yet another compiler error.  Now I not only have faith in the compiler, but the debugger works. This made it easy to find and fix the problem - which was an array modification loop writing over other variables.

The boundaries of the loop have been corrected in the new patch.
Comment 4 Tobias Kortkamp freebsd_committer freebsd_triage 2018-10-21 19:12:10 UTC
Comment on attachment 198442 [details]
Fix array-out-of-bounds error.

This seems ok to me. Still we should wait for maintainer approval again now.
Comment 5 Soeren Straarup freebsd_committer freebsd_triage 2018-10-21 22:32:29 UTC
(In reply to Tobias Kortkamp from comment #4)
I'm okay with the change.
Would you commit if possible?
Comment 6 Tobias Kortkamp freebsd_committer freebsd_triage 2018-10-22 21:32:45 UTC
(In reply to Soeren Straarup from comment #5)
Please do the commit and QA yourself.
Comment 7 commit-hook freebsd_committer freebsd_triage 2019-01-17 14:10:23 UTC
A commit references this bug:

Author: tobik
Date: Thu Jan 17 14:09:27 UTC 2019
New revision: 490563
URL: https://svnweb.freebsd.org/changeset/ports/490563

Log:
  misc/wmcalendar: Fix some out-of-bounds memory access

  PR:		227101
  Submitted by:	crahman@gmail.com
  Approved by:	xride (maintainer)

Changes:
  head/misc/wmcalendar/Makefile
  head/misc/wmcalendar/files/patch-wmCalendar.c
Comment 8 commit-hook freebsd_committer freebsd_triage 2019-01-17 14:11:26 UTC
A commit references this bug:

Author: tobik
Date: Thu Jan 17 14:10:58 UTC 2019
New revision: 490564
URL: https://svnweb.freebsd.org/changeset/ports/490564

Log:
  MFH: r490563

  misc/wmcalendar: Fix some out-of-bounds memory access

  PR:		227101
  Submitted by:	crahman@gmail.com
  Approved by:	xride (maintainer)

  Approved by:	ports-secteam runtime fix blanket

Changes:
_U  branches/2019Q1/
  branches/2019Q1/misc/wmcalendar/Makefile
  branches/2019Q1/misc/wmcalendar/files/patch-wmCalendar.c