From 3c21de9d701f58cc3c2e8d82b85890efca3ba458 Mon Sep 17 00:00:00 2001
From: an7s <an7s@git.zephyr-software.com>
Date: Tue, 2 Jun 2015 14:41:24 +0000
Subject: [PATCH] sanity check generated addresses

Former-commit-id: 996eb705894fbb056b535e3517673d2446f800f5
---
 tools/cgc_protect/pov_to_cso.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/cgc_protect/pov_to_cso.sh b/tools/cgc_protect/pov_to_cso.sh
index 0905b6f1e..ae2e5013a 100755
--- a/tools/cgc_protect/pov_to_cso.sh
+++ b/tools/cgc_protect/pov_to_cso.sh
@@ -135,8 +135,9 @@ grep "${delimiter}" $local_crash_summary | awk -F"${delimiter}" '{print $2}' | s
 #
 
 if [ -f $CRASH_SITES ]; then
+	# format: 0x<address_in_hex>
 	tmp=tmp.$$
-	grep -v "0x0\$" $CRASH_SITES | sort | uniq > $tmp
+	grep -v "0x0\$" $CRASH_SITES | egrep '^0x[a-fA-F0-9]+$' | sort | uniq > $tmp
 	mv $tmp $CRASH_SITES
 
 	while read -r LINE || [[ -n $LINE ]]; do
-- 
GitLab