Fixed incorrect offset calculations when creating the %{1}, %{2}... entries.
authormgriego <mgriego>
Wed, 14 Jul 2004 20:55:20 +0000 (20:55 +0000)
committermgriego <mgriego>
Wed, 14 Jul 2004 20:55:20 +0000 (20:55 +0000)
src/main/valuepair.c

index 075883b..eebe3d5 100644 (file)
@@ -406,8 +406,8 @@ int paircmp(REQUEST *req, VALUE_PAIR *request, VALUE_PAIR *check, VALUE_PAIR **r
                                         */
                                        memcpy(buffer,
                                               auth_item->strvalue + rxmatch[i].rm_so,
-                                              rxmatch[i].rm_eo);
-                                       buffer[rxmatch[i].rm_eo] = '\0';
+                                              rxmatch[i].rm_eo - rxmatch[i].rm_so);
+                                       buffer[rxmatch[i].rm_eo - rxmatch[i].rm_so] = '\0';
 
                                        /*
                                         *      Copy substring, and add it to