Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ea75ccda
Commit
ea75ccda
authored
Dec 09, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure VC resizing fits in s16.
Noted by Georgi Guninski
parent
4c244d1a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
drivers/char/vt.c
drivers/char/vt.c
+5
-0
No files found.
drivers/char/vt.c
View file @
ea75ccda
...
...
@@ -768,6 +768,8 @@ inline int resize_screen(int currcons, int width, int height)
* [this is to be used together with some user program
* like resize that changes the hardware videomode]
*/
#define VC_RESIZE_MAXCOL (32767)
#define VC_RESIZE_MAXROW (32767)
int
vc_resize
(
int
currcons
,
unsigned
int
cols
,
unsigned
int
lines
)
{
unsigned
long
old_origin
,
new_origin
,
new_scr_end
,
rlth
,
rrem
,
err
=
0
;
...
...
@@ -780,6 +782,9 @@ int vc_resize(int currcons, unsigned int cols, unsigned int lines)
if
(
!
vc_cons_allocated
(
currcons
))
return
-
ENXIO
;
if
(
cols
>
VC_RESIZE_MAXCOL
||
lines
>
VC_RESIZE_MAXROW
)
return
-
EINVAL
;
new_cols
=
(
cols
?
cols
:
video_num_columns
);
new_rows
=
(
lines
?
lines
:
video_num_lines
);
new_row_size
=
new_cols
<<
1
;
...
...
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