Skip to content

Instantly share code, notes, and snippets.

@wfng92
Created March 1, 2021 14:24
Show Gist options
  • Save wfng92/0e8f52bdb805aa9f7f1bfc3e216de320 to your computer and use it in GitHub Desktop.
Save wfng92/0e8f52bdb805aa9f7f1bfc3e216de320 to your computer and use it in GitHub Desktop.
import java.util.Arrays;
public class TestJava {
private String[] arrString;
public void BadCode() {
int length = 1;
if (length == 0) {
// TODO: handle this case
}
}
public void DodgyCode() {
Number[] arr = new Integer[10];
arr[0] = 1.0;
}
public void maliciousCode(String[] stringArg) {
arrString = stringArg;
// arrString = Arrays.copyOf(stringArg, stringArg.length);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment