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: cd7e9e8a2f
"find-provides.ksyms, find-requires.ksyms: rewrite indirect CRC parsing"
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
This commit is contained in:
parent
459cc0478d
commit
30b19c9d63
@ -48,7 +48,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}')
|
||||||
|
@ -48,7 +48,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