mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-15 18:13:18 +08:00
NameData is a fixed-size type of 64 bytes. Using strlcpy to copy data into a NameData struct can cause problems because any data that follows the initial null-terminated string will also be part of the data.
19 lines
379 B
Bash
Executable File
19 lines
379 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -o pipefail
|
|
|
|
SCRIPT_DIR=$(dirname "${0}")
|
|
FAILED=false
|
|
true > coccinelle.diff
|
|
|
|
for f in "${SCRIPT_DIR}"/../coccinelle/*.cocci; do
|
|
spatch --very-quiet --include-headers --sp-file "$f" --dir "${SCRIPT_DIR}"/.. | tee -a coccinelle.diff
|
|
rc=$?
|
|
if [ $rc -ne 0 ]; then
|
|
FAILED=true
|
|
fi
|
|
done
|
|
|
|
if [ $FAILED = true ] || [ -s coccinelle.diff ] ; then exit 1; fi
|
|
|