You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2019/11/27 07:53:01 UTC

[Bug 63965] New: Uninitialized variable in winnt_accept()

https://bz.apache.org/bugzilla/show_bug.cgi?id=63965

            Bug ID: 63965
           Summary: Uninitialized variable in winnt_accept()
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Platform
          Assignee: bugs@httpd.apache.org
          Reporter: marc.stern@approach.be
  Target Milestone: ---

In winnt_accept() (server/mpm/winnt/child.c), there's a call to
PostQueuedCompletionStatus() with a buffer (BytesRead) for the number of bytes
read.

When compiling the code with Visual Studio 2019 (v 16.3.10), we get a warning
than BytesRead is not initialized. When using /RTCu (run-time checks for
uninitialzed variables), the program crashes on this line with an exception.

If we initialize the variable to 0, the problem is solved.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 63965] Uninitialized variable in winnt_accept()

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63965

Marc Stern <ma...@approach.be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Marc Stern <ma...@approach.be> ---
Fixed in 2.4.41 (maybe before)

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 63965] Uninitialized variable in winnt_accept()

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63965

Giovanni Bechis <gi...@paclan.it> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|REOPENED                    |RESOLVED

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 63965] Uninitialized variable in winnt_accept()

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63965

--- Comment #5 from Christophe JAILLET <ch...@wanadoo.fr> ---
Backported in 2.4.x branch in r1874971.

Will be part of 2.4.42.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 63965] Uninitialized variable in winnt_accept()

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63965

--- Comment #3 from Giovanni Bechis <gi...@paclan.it> ---
Created attachment 36935
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36935&action=edit
Quick patch as suggested by Marc

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 63965] Uninitialized variable in winnt_accept()

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63965

Christophe JAILLET <ch...@wanadoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |FixedInTrunk,
                   |                            |PatchAvailable

--- Comment #4 from Christophe JAILLET <ch...@wanadoo.fr> ---
Fixed in trunk in r1872394.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 63965] Uninitialized variable in winnt_accept()

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63965

Marc Stern <ma...@approach.be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #2 from Marc Stern <ma...@approach.be> ---
Sorry, it's not fixed. My mistake

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org