private int checkAnsiString(Memory mem, Address adref) {
		int len = getStringLength(mem, adref, processorAlignment); // returns -1 for bad

		if (len <= 0) {
			return 0;
		}

//		int len2 = getStrLen(mem, adref.subtract(4));
//		if (len2 > len + 2)
//			return 0;

		return len;
	}
checkAnsiString:
Checks ascii string for "goodness".
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/OperandReferenceAnalyzer.java