summaryrefslogtreecommitdiff
path: root/graphics/pfstools/files/patch-src_pfs_pfs.h
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2018-03-20 06:33:01 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2018-03-20 06:33:01 +0000
commit54975cd08c68b62b6b079b6c30c7868ffd7db5a8 (patch)
tree26ee11762268f4c16b74fc0b9210b6c16cbc941b /graphics/pfstools/files/patch-src_pfs_pfs.h
parentFix build with clang 6 (diff)
graphics/pfstools: Update to 2.1.0
Port changes: * Change to DISTVERSION * Add LICENSE_FILE * Change to cmake (from gmake) * Update of all options accordingly PR: 225537 Submitted by: Iouri V. Ivliev <fbsd@any.com.ru> (maintainer)
Diffstat (limited to 'graphics/pfstools/files/patch-src_pfs_pfs.h')
-rw-r--r--graphics/pfstools/files/patch-src_pfs_pfs.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/graphics/pfstools/files/patch-src_pfs_pfs.h b/graphics/pfstools/files/patch-src_pfs_pfs.h
new file mode 100644
index 000000000000..51b4d3c91a7d
--- /dev/null
+++ b/graphics/pfstools/files/patch-src_pfs_pfs.h
@@ -0,0 +1,38 @@
+--- src/pfs/pfs.h.orig 2018-02-26 13:58:05 UTC
++++ src/pfs/pfs.h
+@@ -141,6 +141,7 @@ namespace pfs
+ class TagContainer
+ {
+ public:
++ virtual ~TagContainer() {};
+ /**
+ * Get a string tag of the name tagName from the TagContainer.
+ * @param tagName name of the tag to retrieve
+@@ -187,6 +188,7 @@ namespace pfs
+ */
+ class Channel : public Array2D {
+ public:
++ virtual ~Channel() {};
+ /**
+ * Gets width of the channel (in pixels).
+ * This is a synonym for Array2D::getCols().
+@@ -596,7 +598,9 @@ namespace pfs
+ */
+ Exception( const char* const message )
+ {
+- strcpy( msg, message );
++ const size_t s = sizeof(msg)/sizeof(msg[0]) - 1;
++ strncpy( msg, message, s );
++ msg[s] = '\0';
+ }
+
+ ~Exception() {};
+@@ -606,7 +610,7 @@ namespace pfs
+ *
+ * @return text description of the cause for the exception
+ */
+- const char* getMessage()
++ const char* getMessage() const throw()
+ {
+ return msg;
+ }