diff --git a/chb/buffer/LibraryCallCallsites.py b/chb/buffer/LibraryCallCallsites.py index 6847fa40..cbb7219c 100644 --- a/chb/buffer/LibraryCallCallsites.py +++ b/chb/buffer/LibraryCallCallsites.py @@ -358,7 +358,8 @@ def known_input_length(self) -> Optional[str]: fmtarg = self.instr.call_arguments[1] if fmtarg.is_string_reference: fmtstr = (cast(XprConstant, fmtarg)).constant.string_reference() - if not "%s" in fmtstr: + # TODO: Smarter heuristics for problematic length fmt strings + if not "%" in fmtstr: return "sprintf:max_length_fmt" else: return None @@ -368,7 +369,8 @@ def known_input_length(self) -> Optional[str]: fmtarg = self.instr.call_arguments[2] if fmtarg.is_string_reference: fmtstr = (cast(XprConstant, fmtarg)).constant.string_reference() - if not "%s" in fmtstr: + # TODO: Smarter heuristics for problematic length fmt strings + if not "%" in fmtstr: return "snprintf:max_length_fmt" else: return None