Bug 1437111 - glibc: Incorrect backport of “Clean up internal fopen uses” upstream patch
Summary: glibc: Incorrect backport of “Clean up internal fopen uses” upstream patch
Keywords:
Status: CLOSED DUPLICATE of bug 1437147
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: glibc
Version: 6.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: glibc team
QA Contact: qe-baseos-tools
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-29 13:59 UTC by Florian Weimer
Modified: 2020-07-16 09:21 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-29 15:56:05 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Florian Weimer 2017-03-29 13:59:30 UTC
glibc-2.12-1.207.el6 backported this upstream commit:

commit 312be3f9f5eab1643d7dcc7728c76d413d4f2640
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Tue Nov 15 04:24:42 2011 -0500

    Clean up internal fopen uses
    
    No need to ever not use c and e.

However, the backport contains this change:

-  memcpy (mempcpy (newmode, mode, modelen), "c", 2);
+  memcpy (mempcpy (newmode, mode, modelen), "ce", 2);

This is not correct, upstream uses 

   memcpy (mempcpy (newmode, mode, modelen), "ce", 3);

instead.

Comment 1 Florian Weimer 2017-03-29 14:00:33 UTC
Fist reported here: https://blogs.oracle.com/wim/entry/oracle_linux_6_update_9

(Via bug 1012343 comment 21.)

Comment 2 Anssi Johansson 2017-03-29 14:10:32 UTC
Do note that you will need to increase the size of the newmode array as well.

Comment 3 Carlos O'Donell 2017-03-29 15:56:05 UTC
I'm closing this as a duplicate of bug 1437147 because we need some additional fixes we missed in the original backport review.

*** This bug has been marked as a duplicate of bug 1437147 ***


Note You need to log in before you can comment on or make changes to this bug.