Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
88896c46
Commit
88896c46
authored
May 15, 2017
by
Timo Rothenpieler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compat/cuda/ptx2c: remove bashism and harden against arbitrary input
parent
f0435bbe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
ptx2c.sh
compat/cuda/ptx2c.sh
+6
-6
No files found.
compat/cuda/ptx2c.sh
100644 → 100755
View file @
88896c46
#!/bin/sh
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
#
# Permission is hereby granted, free of charge, to any person obtaining a
# Permission is hereby granted, free of charge, to any person obtaining a
...
@@ -22,15 +24,13 @@ set -e
...
@@ -22,15 +24,13 @@ set -e
OUT
=
"
$1
"
OUT
=
"
$1
"
IN
=
"
$2
"
IN
=
"
$2
"
NAME
=
"
$(
basename
"
$IN
"
)
"
NAME
=
"
$(
basename
"
$IN
"
|
sed
's/\..*//'
)
"
NAME
=
"
${
NAME
/.ptx/
}
"
echo
-n
"const char
${
NAME
}
_ptx[] =
\\
"
>
"
$OUT
"
printf
"const char %s_ptx[] =
\\
"
"
$NAME
"
>
"
$OUT
"
while
read
LINE
while
read
LINE
do
do
echo
-ne
"
\n\t\"
$LINE
\\\n\"
"
>>
"
$OUT
"
printf
"
\n\t\"
%s
\\\n\"
"
"
$(
printf
"%s"
"
$LINE
"
|
sed
's/["\\]/\\&/g'
)
"
>>
"
$OUT
"
done
<
"
$IN
"
done
<
"
$IN
"
echo
";
"
>>
"
$OUT
"
printf
";
\n
"
>>
"
$OUT
"
exit
0
exit
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