You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/09/07 12:09:29 UTC

svn commit: r993310 - /subversion/trunk/subversion/mod_dav_svn/reports/log.c

Author: stsp
Date: Tue Sep  7 10:09:28 2010
New Revision: 993310

URL: http://svn.apache.org/viewvc?rev=993310&view=rev
Log:
Follow-up to r993183:

* subversion/mod_dav_svn/reports/log.c
  (dav_svn__log_report): Use svn_cstring_atoi() instead of atoi(), and
   handle conversion errors properly this time.

Modified:
    subversion/trunk/subversion/mod_dav_svn/reports/log.c

Modified: subversion/trunk/subversion/mod_dav_svn/reports/log.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/reports/log.c?rev=993310&r1=993309&r2=993310&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/reports/log.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/reports/log.c Tue Sep  7 10:09:28 2010
@@ -311,7 +311,17 @@ dav_svn__log_report(const dav_resource *
       else if (strcmp(child->name, "end-revision") == 0)
         end = SVN_STR_TO_REV(dav_xml_get_cdata(child, resource->pool, 1));
       else if (strcmp(child->name, "limit") == 0)
-        limit = atoi(dav_xml_get_cdata(child, resource->pool, 1));
+        {
+          serr = svn_cstring_atoi(&limit,
+                                  dav_xml_get_cdata(child, resource->pool, 1));
+          if (serr)
+            {
+              derr = dav_svn__convert_err(serr, HTTP_BAD_REQUEST,
+                                          "Malformed CDATA in element "
+                                          "\"limit\"", resource->pool);
+              goto cleanup;
+            }
+        }
       else if (strcmp(child->name, "discover-changed-paths") == 0)
         discover_changed_paths = TRUE; /* presence indicates positivity */
       else if (strcmp(child->name, "strict-node-history") == 0)