From 2f91473a06d4a33b9165d68d036a8113df4a18d8 Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 2 Jan 2020 16:04:29 +0000 Subject: [PATCH] Remove FIXME comment: newstrlen *is* checked. I added this a long time ago, and decided to check it. In fact, newstrlen is used to calculate newstrend, and each section of the template is checked to ensure it does not go past newstrend, so the intent is met and the length is not exceeded. I still think it could be written more clearly, but it's good for now. #1834 --- service_scan.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/service_scan.cc b/service_scan.cc index 1fcc93970..4ce378ed0 100644 --- a/service_scan.cc +++ b/service_scan.cc @@ -914,7 +914,6 @@ static char *substvar(char *tmplvar, char **tmplvarend, // matches in ovector. The NUL-terminated newly composted string is // placed into 'newstr', as long as it doesn't exceed 'newstrlen' // bytes. Trailing whitespace and commas are removed. Returns zero for success -// FIXME: The newstrlen argument is not actually checked, is it? // // The transform argument is a function pointer. If not NULL, the given // function is applied to all substitutions before they are inserted