]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Correctly remove trailing space from arguments of incoming
authorPeter Rosin <peda@lysator.liu.se>
Fri, 8 Aug 2003 09:43:34 +0000 (11:43 +0200)
committerPeter Rosin <peda@lysator.liu.se>
Fri, 8 Aug 2003 09:43:34 +0000 (11:43 +0200)
request variables.

bk: 3f3370c6JlMWTU_kx0ej_-7QRzAIcw

ntpd/ntp_control.c

index 9f061926a7bada11a62eb672d6409cd7a68c132d..a06dd506289ef2e3fced77d8331a0e3d50605b1f 100644 (file)
@@ -1884,10 +1884,10 @@ ctl_getitem(
                                        if (cp < reqend)
                                                cp++;
                                        *tp-- = '\0';
-                                       while (tp > buf) {
-                                               *tp-- = '\0';
+                                       while (tp >= buf) {
                                                if (!isspace((int)(*tp)))
                                                        break;
+                                               *tp-- = '\0';
                                        }
                                        reqpt = cp;
                                        *data = buf;