Bug 198465 - [maintainer] x11/slim: fix access out of bound in slim
Summary: [maintainer] x11/slim: fix access out of bound in slim
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bartek Rutkowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-09 19:30 UTC by Henry Hu
Modified: 2015-03-13 14:31 UTC (History)
1 user (show)

See Also:


Attachments
fix malloc and memcpy arguments (1.25 KB, patch)
2015-03-09 19:30 UTC, Henry Hu
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Hu 2015-03-09 19:30:22 UTC
Created attachment 154098 [details]
fix malloc and memcpy arguments

The attached patch fixes access-out-of-bound in slim.
The size argument of memcpy() and malloc() is wrong when modifying environment variables.
Patch tested by reporter and works as intended.
The problem was present, but luckily slim still works. With the new patch to support login.conf, the problematic variables are used, and the bug is triggered.

Reported by: Holger Schröder <holgihsp@gmail.com>
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-03-13 14:26:21 UTC
A commit references this bug:

Author: robak
Date: Fri Mar 13 14:26:18 UTC 2015
New revision: 381210
URL: https://svnweb.freebsd.org/changeset/ports/381210

Log:
  x11/slim: fix malloc and memcpy arguments

  PR:		198465
  Submitted by:	Henry Hu <henry.hu.sh@gmail.com>

Changes:
  head/x11/slim/Makefile
  head/x11/slim/files/patch-app.cpp
Comment 2 Bartek Rutkowski freebsd_committer freebsd_triage 2015-03-13 14:31:29 UTC
Committed, thanks for your work!