Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dma_ip_drivers
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Libraries
dma_ip_drivers
Commits
811d586b
Commit
811d586b
authored
Oct 06, 2020
by
Julien
Committed by
David Thach
Oct 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libxdma: fix string overflow
set name length to 16 and use snprintf
parent
a1d510f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
XDMA/linux-kernel/libxdma/libxdma.c
XDMA/linux-kernel/libxdma/libxdma.c
+1
-1
XDMA/linux-kernel/libxdma/libxdma.h
XDMA/linux-kernel/libxdma/libxdma.h
+1
-1
No files found.
XDMA/linux-kernel/libxdma/libxdma.c
View file @
811d586b
...
...
@@ -3074,7 +3074,7 @@ static int engine_init(struct xdma_engine *engine, struct xdma_dev *xdev,
/* remember SG DMA direction */
engine
->
dir
=
dir
;
s
printf
(
engine
->
name
,
"%d-%s%d-%s"
,
xdev
->
idx
,
s
nprintf
(
engine
->
name
,
sizeof
(
engine
->
name
)
,
"%d-%s%d-%s"
,
xdev
->
idx
,
(
dir
==
DMA_TO_DEVICE
)
?
"H2C"
:
"C2H"
,
channel
,
engine
->
streaming
?
"ST"
:
"MM"
);
...
...
XDMA/linux-kernel/libxdma/libxdma.h
View file @
811d586b
...
...
@@ -475,7 +475,7 @@ struct xdma_request_cb {
struct
xdma_engine
{
unsigned
long
magic
;
/* structure ID for sanity checks */
struct
xdma_dev
*
xdev
;
/* parent device */
char
name
[
5
];
/* name of this engine */
char
name
[
16
];
/* name of this engine */
int
version
;
/* version of this engine */
//dev_t cdevno; /* character device major:minor */
//struct cdev cdev; /* character device (embedded struct) */
...
...
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