diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-01-19 16:02:40 +0100 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-01-19 16:02:40 +0100 |
commit | f750288769b23497ad5b57b1c50f683402c509f6 (patch) | |
tree | b71f2a2c6ed6b5a1f5353c58780b09ef55f2c383 /src/Daemon | |
parent | b8ef905c6455ef98cd7fa488de7d602a70bd57dc (diff) | |
parent | b7e20eb84250ce9feeefde8dad2eab448125dc5d (diff) | |
download | abrt-f750288769b23497ad5b57b1c50f683402c509f6.tar.gz abrt-f750288769b23497ad5b57b1c50f683402c509f6.tar.xz abrt-f750288769b23497ad5b57b1c50f683402c509f6.zip |
Merge branch 'master' into rhel6
Diffstat (limited to 'src/Daemon')
-rw-r--r-- | src/Daemon/CommLayerServerDBus.cpp | 9 | ||||
-rw-r--r-- | src/Daemon/Daemon.cpp | 1 | ||||
-rw-r--r-- | src/Daemon/MiddleWare.cpp | 4 |
3 files changed, 6 insertions, 8 deletions
diff --git a/src/Daemon/CommLayerServerDBus.cpp b/src/Daemon/CommLayerServerDBus.cpp index db0d2f55..182aa6c2 100644 --- a/src/Daemon/CommLayerServerDBus.cpp +++ b/src/Daemon/CommLayerServerDBus.cpp @@ -205,10 +205,8 @@ static int handle_Report(DBusMessage* call, DBusMessage* reply) int r; DBusMessageIter in_iter; dbus_message_iter_init(call, &in_iter); - map_crash_report_t argin1; - const char* comment; - const char* reproduce; + map_crash_report_t argin1; r = load_val(&in_iter, argin1); if (r == ABRT_DBUS_ERROR) { @@ -218,9 +216,8 @@ static int handle_Report(DBusMessage* call, DBusMessage* reply) map_crash_report_t::const_iterator it_comment = argin1.find(CD_COMMENT); map_crash_report_t::const_iterator it_reproduce = argin1.find(CD_REPRODUCE); - comment = (it_comment != argin1.end()) ? it_comment->second[CD_CONTENT].c_str() : ""; - reproduce = (it_reproduce != argin1.end()) ? it_reproduce->second[CD_CONTENT].c_str() : ""; - + const char* comment = (it_comment != argin1.end()) ? it_comment->second[CD_CONTENT].c_str() : ""; + const char* reproduce = (it_reproduce != argin1.end()) ? it_reproduce->second[CD_CONTENT].c_str() : ""; const char* errmsg = NULL; if (strlen(comment) > LIMIT_MESSAGE) { diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index a2970af2..dc547af3 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -21,7 +21,6 @@ #include <pthread.h> #include <resolv.h> /* res_init */ #include <string> -#include <limits.h> #include <sys/inotify.h> #include <xmlrpc-c/base.h> #include <xmlrpc-c/client.h> diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index 70527ebe..c2a122a7 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -187,7 +187,7 @@ static void DebugDumpToCrashReport(const char *pDebugDumpDir, map_crash_report_t add_crash_data_to_crash_report( pCrashReport, short_name, - (content.length() < CD_ATT_SIZE ? CD_TXT : CD_ATT), + CD_TXT, CD_ISEDITABLE, content ); @@ -433,6 +433,8 @@ report_status_t Report(const map_crash_report_t& pCrashReport, { report_status_t ret; + /* dbus handler passes pCrashReport from user without checking it */ + if (!CheckReport(pCrashReport)) { throw CABRTException(EXCEP_ERROR, "Report(): Some of mandatory report data are missing."); |