perhaps this should have a maxlen argument so that `stringpatch` can throw a helpful error instead of corrupting the binary