MINIDUMP: Add check for dump_minimal env variable

dump_minimal env variable  is not currently
validated against junk characters. This check enables
minimal dump only when it  is set to 1.

Change-Id: I62a32ae1fc5c9355321c7b5ba2f6a96d8e890c50
Signed-off-by: Venkat Raju Sana <vrsana@codeaurora.org>
Signed-off-by: Venkat Raju Sana <vrsana@codeaurora.org>
diff --git a/common/autoboot.c b/common/autoboot.c
index beec048..37076ad 100644
--- a/common/autoboot.c
+++ b/common/autoboot.c
@@ -373,10 +373,17 @@
 	if (apps_iscrashed()) {
 		printf("Crashdump magic found, initializing dump activity..\n");
 		s = getenv("dump_to_flash");
-		if (!s)
+		if (!s) {
 			s = getenv("dump_minimal");
+			if (s) {
+				if (strncmp(s, "1", sizeof("1"))) {
+					printf("\nError: Invalid variable dump_minimal \n");
+					reset_board();
+				}
+			}
+		}
 		if (s) {
-			do_dumpqca_minimal_data(s);	/* write core dump data to flash */
+			do_dumpqca_minimal_data(s);
 			reset_board();
 		}
 		else