aboutsummaryrefslogtreecommitdiff
path: root/src/apps/utils.h
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-04-19 23:47:39 +0200
committerEven Rouault <even.rouault@spatialys.com>2019-04-20 09:19:41 +0200
commit8a31ed4036888ff2039919f8c998a90cb2143bc2 (patch)
tree25302c86a4161a2e11a076a9e3c9cb4bf8b418c7 /src/apps/utils.h
parente1da8e5f6933bfb914dccb26a755a23b5ce9f36f (diff)
downloadPROJ-8a31ed4036888ff2039919f8c998a90cb2143bc2.tar.gz
PROJ-8a31ed4036888ff2039919f8c998a90cb2143bc2.zip
proj/cs2cs: validate value of -f parameter to avoid potential crashes (fixes #124)
Diffstat (limited to 'src/apps/utils.h')
-rw-r--r--src/apps/utils.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/apps/utils.h b/src/apps/utils.h
new file mode 100644
index 00000000..99c14091
--- /dev/null
+++ b/src/apps/utils.h
@@ -0,0 +1,29 @@
+/******************************************************************************
+ *
+ * Project: PROJ
+ * Purpose: Utilities for command line arguments
+ * Author: Even Rouault <even dot rouault at spatialys dot com>
+ *
+ ******************************************************************************
+ * Copyright (c) 2019, Even Rouault <even dot rouault at spatialys dot com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ****************************************************************************/
+
+bool validate_form_string_for_numbers(const char* formatString);