mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-10-23 21:50:49 +00:00
GP-866: resetSyntax required to prevent parsing of numbers as numbers in command line
This commit is contained in:
parent
9113e08b48
commit
4d65ccd052
|
@ -98,6 +98,7 @@ public interface TargetLauncher extends TargetObject {
|
|||
|
||||
public CmdLineParser(Reader r) {
|
||||
super(r);
|
||||
resetSyntax();
|
||||
wordChars(0, 255);
|
||||
whitespaceChars(' ', ' ');
|
||||
quoteChar('"');
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package ghidra.dbg.target;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import ghidra.dbg.target.TargetLauncher.CmdLineParser;
|
||||
|
||||
public class TargetLauncherTest {
|
||||
@Test
|
||||
public void testCmdLineParser() {
|
||||
assertEquals(List.of("C:\\Windows", "10\\notepad.exe"),
|
||||
CmdLineParser.tokenize("C:\\Windows 10\\notepad.exe"));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user