Bug 194210 - [patch] graphics/gimageview: g_return_if_fail() on uninitialized variable
Summary: [patch] graphics/gimageview: g_return_if_fail() on uninitialized variable
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: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-07 04:15 UTC by Nathan Lay
Modified: 2014-10-07 17:54 UTC (History)
1 user (show)

See Also:


Attachments
The patch that fixes the above issue. It can be dropped into the files directory in graphics/gimageview. (494 bytes, patch)
2014-10-07 04:15 UTC, Nathan Lay
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Lay 2014-10-07 04:15:17 UTC
Created attachment 148052 [details]
The patch that fixes the above issue. It can be dropped into the files directory in graphics/gimageview.

gimageview interfaces with mplayer through some form of IPC. When processing input from mplayer in the function process_lines() found in plugins/image_view/gimv_mplayer.c, it does a few sanity checks with g_return_if_fail(). One of those checks is on the uninitialized variable 'size' which always triggers a failure when gimageview is compiled with clang (but coincidentally always worked with gcc).

The attached patch initializes 'size' first so that g_return_if_fail() is no longer triggered.
Comment 1 commit-hook freebsd_committer freebsd_triage 2014-10-07 15:52:23 UTC
A commit references this bug:

Author: amdmi3
Date: Tue Oct  7 15:51:51 UTC 2014
New revision: 370352
URL: https://svnweb.freebsd.org/changeset/ports/370352

Log:
  - Fix checking unitialized variable
  - While here, add LICENSE

  PR:		194210
  Submitted by:	enslay@gmail.com
  MFH:		2014Q4

Changes:
  head/graphics/gimageview/Makefile
  head/graphics/gimageview/files/patch-plugins__image_view__gimv_mplayer.c
Comment 2 commit-hook freebsd_committer freebsd_triage 2014-10-07 17:54:38 UTC
A commit references this bug:

Author: amdmi3
Date: Tue Oct  7 17:54:08 UTC 2014
New revision: 370383
URL: https://svnweb.freebsd.org/changeset/ports/370383

Log:
  MFH: r370352

  - Fix checking unitialized variable
  - While here, add LICENSE

  PR:		194210
  Submitted by:	enslay@gmail.com
  Approved by:	portmgr (bdrewery)

Changes:
_U  branches/2014Q4/
  branches/2014Q4/graphics/gimageview/Makefile
  branches/2014Q4/graphics/gimageview/files/patch-plugins__image_view__gimv_mplayer.c