Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
cda8e441
Commit
cda8e441
authored
Dec 16, 2008
by
Jörg Höhle
Committed by
Alexandre Julliard
Dec 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecfg: Prevent crash when clearing volume serial number input.
parent
06130248
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
drive.c
programs/winecfg/drive.c
+1
-1
driveui.c
programs/winecfg/driveui.c
+5
-3
No files found.
programs/winecfg/drive.c
View file @
cda8e441
...
...
@@ -187,7 +187,7 @@ static void set_drive_serial( char letter, DWORD serial )
HANDLE
hFile
;
filename
[
0
]
=
letter
;
WINE_TRACE
(
"Putting serial number of %08
x
into file '%s'
\n
"
,
serial
,
filename
);
WINE_TRACE
(
"Putting serial number of %08
X
into file '%s'
\n
"
,
serial
,
filename
);
hFile
=
CreateFile
(
filename
,
GENERIC_WRITE
,
FILE_SHARE_READ
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
hFile
!=
INVALID_HANDLE_VALUE
)
...
...
programs/winecfg/driveui.c
View file @
cda8e441
...
...
@@ -520,10 +520,11 @@ static void on_edit_changed(HWND dialog, WORD id)
char
*
serial
;
serial
=
get_text
(
dialog
,
id
);
current_drive
->
serial
=
strtoul
(
serial
,
NULL
,
16
);
current_drive
->
serial
=
serial
?
strtoul
(
serial
,
NULL
,
16
)
:
0
;
HeapFree
(
GetProcessHeap
(),
0
,
serial
);
current_drive
->
modified
=
TRUE
;
WINE_TRACE
(
"set serial to %08
x
\n
"
,
current_drive
->
serial
);
WINE_TRACE
(
"set serial to %08
X
\n
"
,
current_drive
->
serial
);
/* enable the apply button */
SendMessage
(
GetParent
(
dialog
),
PSM_CHANGED
,
(
WPARAM
)
dialog
,
0
);
...
...
@@ -775,7 +776,8 @@ DriveDlgProc (HWND dialog, UINT msg, WPARAM wParam, LPARAM lParam)
current_drive
->
label
=
str
;
str
=
get_textW
(
dialog
,
IDC_EDIT_SERIAL
);
current_drive
->
serial
=
strtoulW
(
str
,
NULL
,
16
);
current_drive
->
serial
=
str
?
strtoulW
(
str
,
NULL
,
16
)
:
0
;
HeapFree
(
GetProcessHeap
(),
0
,
str
);
current_drive
->
modified
=
TRUE
;
/* TODO: we don't have a device at this point */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment