Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
14707cba
Commit
14707cba
authored
Mar 11, 2010
by
Srikanth Raju
Committed by
Jean-Philippe André
Mar 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lua: Avoid segmentation fault on recv() fail
Signed-off-by:
Jean-Philippe André
<
jpeg@videolan.org
>
parent
2bb90c75
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
modules/misc/lua/libs/net.c
modules/misc/lua/libs/net.c
+7
-2
No files found.
modules/misc/lua/libs/net.c
View file @
14707cba
...
@@ -185,8 +185,13 @@ static int vlclua_net_recv( lua_State *L )
...
@@ -185,8 +185,13 @@ static int vlclua_net_recv( lua_State *L )
size_t
i_len
=
luaL_optint
(
L
,
2
,
1
);
size_t
i_len
=
luaL_optint
(
L
,
2
,
1
);
char
psz_buffer
[
i_len
];
char
psz_buffer
[
i_len
];
i_len
=
recv
(
i_fd
,
psz_buffer
,
i_len
,
0
);
i_len
=
recv
(
i_fd
,
psz_buffer
,
i_len
,
0
);
if
(
i_len
>
0
)
{
lua_pushlstring
(
L
,
psz_buffer
,
i_len
);
lua_pushlstring
(
L
,
psz_buffer
,
i_len
);
return
1
;
return
1
;
}
else
return
0
;
}
}
/*****************************************************************************
/*****************************************************************************
...
...
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