[solang] Improved Exif data query to avoid SQLite parser stack overflows



commit 543faa756ae273687f61607464fc7386a4111c07
Author: Debarshi Ray <rishi gnu org>
Date:   Wed Dec 30 13:46:57 2009 +0200

    Improved Exif data query to avoid SQLite parser stack overflows

 src/common/photo.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/common/photo.cpp b/src/common/photo.cpp
index 3b26cdc..b9c0dba 100644
--- a/src/common/photo.cpp
+++ b/src/common/photo.cpp
@@ -101,7 +101,8 @@ Photo::get_exif_data_query() const throw()
     return Glib::ustring::compose(
         "SELECT ?camera ?exposure ?fn ?focal ?iso ?metering "
         "WHERE {"
-        "  ?photo nie:isStoredAs ?data ."
+        "  ?photo a nmm:Photo ;"
+        "  nie:isStoredAs ?data ."
         "  ?data nie:url '%1' ."
         "  OPTIONAL { ?photo nmm:camera ?camera . }"
         "  OPTIONAL { ?photo nmm:exposureTime ?exposure . }"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]