Bug 1657 - use of a uninitialized variable
Summary: use of a uninitialized variable
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.5
Hardware: All Linux
: P3 normal
Target Milestone: none
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-24 04:15 UTC by Helmut Heinreichsberger
Modified: 2005-08-24 10:24 UTC (History)
0 users

See Also:


Attachments
patch to correct the problem uninitialized variable action (313 bytes, patch)
2004-08-24 04:18 UTC, Helmut Heinreichsberger
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Heinreichsberger 2004-08-24 04:15:27 UTC
in the function open_file_shared1 the variable action is used uninitialized. I 
asume that this is a typing error, and the pointer should be NULL protected as 
in line 1385 from open.c.
The problem also exists in the CVS branch.

The patch to correct this problem:
--- source/smbd/open.c.save     2004-07-08 19:06:10.000000000 +0200
+++ source/smbd/open.c  2004-08-24 12:33:16.000000000 +0200
@@ -1024,7 +1024,7 @@
                        ignored */
                if (Access)
                        *Access = DOS_OPEN_WRONLY;
-               if (action)
+               if (paction)
                        *paction = FILE_WAS_CREATED;
                return print_fsp_open(conn, fname);
        }
------------------------ End of patch -----------------------

the file open.c.save is the original file
Comment 1 Helmut Heinreichsberger 2004-08-24 04:18:52 UTC
Created attachment 614 [details]
patch to correct the problem uninitialized variable action
Comment 2 Gerald (Jerry) Carter (dead mail address) 2004-08-24 05:33:00 UTC
Jeremy,  wanty to grab this one?  Thanks.
Comment 3 Jeremy Allison 2004-08-24 16:36:10 UTC
Correct fix, thanks !
Jeremy.
Comment 4 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:24:15 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.