Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
60901b75
Commit
60901b75
authored
Jun 20, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Don't crash when trying to set a file lock on a device.
parent
332d1495
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
fd.c
server/fd.c
+6
-6
trace.c
server/trace.c
+1
-0
No files found.
server/fd.c
View file @
60901b75
...
@@ -1184,12 +1184,6 @@ static struct file_lock *add_lock( struct fd *fd, int shared, file_pos_t start,
...
@@ -1184,12 +1184,6 @@ static struct file_lock *add_lock( struct fd *fd, int shared, file_pos_t start,
{
{
struct
file_lock
*
lock
;
struct
file_lock
*
lock
;
if
(
!
fd
->
inode
)
/* not a regular file */
{
set_error
(
STATUS_INVALID_HANDLE
);
return
NULL
;
}
if
(
!
(
lock
=
alloc_object
(
&
file_lock_ops
)))
return
NULL
;
if
(
!
(
lock
=
alloc_object
(
&
file_lock_ops
)))
return
NULL
;
lock
->
shared
=
shared
;
lock
->
shared
=
shared
;
lock
->
start
=
start
;
lock
->
start
=
start
;
...
@@ -1259,6 +1253,12 @@ obj_handle_t lock_fd( struct fd *fd, file_pos_t start, file_pos_t count, int sha
...
@@ -1259,6 +1253,12 @@ obj_handle_t lock_fd( struct fd *fd, file_pos_t start, file_pos_t count, int sha
struct
list
*
ptr
;
struct
list
*
ptr
;
file_pos_t
end
=
start
+
count
;
file_pos_t
end
=
start
+
count
;
if
(
!
fd
->
inode
)
/* not a regular file */
{
set_error
(
STATUS_INVALID_DEVICE_REQUEST
);
return
0
;
}
/* don't allow wrapping locks */
/* don't allow wrapping locks */
if
(
end
&&
end
<
start
)
if
(
end
&&
end
<
start
)
{
{
...
...
server/trace.c
View file @
60901b75
...
@@ -4246,6 +4246,7 @@ static const struct
...
@@ -4246,6 +4246,7 @@ static const struct
{
"ILLEGAL_FUNCTION"
,
STATUS_ILLEGAL_FUNCTION
},
{
"ILLEGAL_FUNCTION"
,
STATUS_ILLEGAL_FUNCTION
},
{
"INSTANCE_NOT_AVAILABLE"
,
STATUS_INSTANCE_NOT_AVAILABLE
},
{
"INSTANCE_NOT_AVAILABLE"
,
STATUS_INSTANCE_NOT_AVAILABLE
},
{
"INVALID_CID"
,
STATUS_INVALID_CID
},
{
"INVALID_CID"
,
STATUS_INVALID_CID
},
{
"INVALID_DEVICE_REQUEST"
,
STATUS_INVALID_DEVICE_REQUEST
},
{
"INVALID_FILE_FOR_SECTION"
,
STATUS_INVALID_FILE_FOR_SECTION
},
{
"INVALID_FILE_FOR_SECTION"
,
STATUS_INVALID_FILE_FOR_SECTION
},
{
"INVALID_HANDLE"
,
STATUS_INVALID_HANDLE
},
{
"INVALID_HANDLE"
,
STATUS_INVALID_HANDLE
},
{
"INVALID_PARAMETER"
,
STATUS_INVALID_PARAMETER
},
{
"INVALID_PARAMETER"
,
STATUS_INVALID_PARAMETER
},
...
...
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