find-provides.ksyms, find-requires.ksyms: use "read -r"
To avoid all kinds of fun that might stem from interpreting the user-supplied
input.
* find-provides.ksyms: Supply -r option to the read call.
* find-requires.ksyms (all_provides): Likewise.
Fixes: fd79794323
"find-provides.ksyms, find-requires.ksyms: rewrite indirect CRC parsing"
Resolves: #2178935
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
This commit is contained in:
parent
c0a9b49b96
commit
45ce51d5ff
@ -49,7 +49,7 @@ for module in $(grep -E '/lib/modules/.+\.ko(\.gz|\.bz2|\.xz|\.zst)?$') "$@"; do
|
|||||||
objdump -t "$module" \
|
objdump -t "$module" \
|
||||||
| sed -n 's/^[0-9a-f][0-9a-f]* [gl]...... \(.*\) [0-9a-f][0-9a-f]* __crc_.*$/\1/p' \
|
| sed -n 's/^[0-9a-f][0-9a-f]* [gl]...... \(.*\) [0-9a-f][0-9a-f]* __crc_.*$/\1/p' \
|
||||||
| sort -u \
|
| sort -u \
|
||||||
| while read sectname; do
|
| while read -r sectname; do
|
||||||
[ -n "$sectname" ] || continue
|
[ -n "$sectname" ] || continue
|
||||||
|
|
||||||
ELFSECTDATA=$(readelf -R "$sectname" "$module" | awk '/0x/{printf $2$3$4$5}')
|
ELFSECTDATA=$(readelf -R "$sectname" "$module" | awk '/0x/{printf $2$3$4$5}')
|
||||||
|
@ -49,7 +49,7 @@ all_provides() {
|
|||||||
objdump -t "$module" \
|
objdump -t "$module" \
|
||||||
| sed -n 's/^[0-9a-f][0-9a-f]* [gl]...... \(.*\) [0-9a-f][0-9a-f]* __crc_.*$/\1/p' \
|
| sed -n 's/^[0-9a-f][0-9a-f]* [gl]...... \(.*\) [0-9a-f][0-9a-f]* __crc_.*$/\1/p' \
|
||||||
| sort -u \
|
| sort -u \
|
||||||
| while read sectname; do
|
| while read -r sectname; do
|
||||||
[ -n "$sectname" ] || continue
|
[ -n "$sectname" ] || continue
|
||||||
|
|
||||||
ELFSECTDATA=$(readelf -R "$sectname" "$module" | awk '/0x/{printf $2$3$4$5}')
|
ELFSECTDATA=$(readelf -R "$sectname" "$module" | awk '/0x/{printf $2$3$4$5}')
|
||||||
|
Loading…
Reference in New Issue
Block a user