Skip to content

Fix case of 'Rename-Lesson' to 'rename-lesson' - #6

Open
Jfar97 wants to merge 353 commits into
pwncollege:mainfrom
Jfar97:main
Open

Fix case of 'Rename-Lesson' to 'rename-lesson'#6
Jfar97 wants to merge 353 commits into
pwncollege:mainfrom
Jfar97:main

Conversation

@Jfar97

@Jfar97 Jfar97 commented Mar 13, 2026

Copy link
Copy Markdown

No description provided.

Jfar97 added 28 commits March 12, 2026 16:01
Added paths for tools and updated commands for compiling and copying tools.
Added setup for extension installation and script management.
Added checks to ensure variables are renamed before printing flag content. Added an error message for incorrect renaming.
Copilot AI review requested due to automatic review settings April 8, 2026 05:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR appears to restructure the dojo content (removing the sample hello/demo modules and introducing a re-intro module), while also vendoring in a large set of Ghidra-related GPL modules/extensions and adding new reverse-engineering challenge scaffolding.

Changes:

  • Replaces the dojo’s module list/configuration to point at re-intro instead of the sample modules.
  • Adds Ghidra GPL modules (DemanglerGnu + DMG) and multiple Ghidra extension artifacts/scripts.
  • Adds new challenge content/scripts (e.g., rename lesson + key-check challenges) and supporting init scripts.

Reviewed changes

Copilot reviewed 118 out of 6312 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DemanglerGnu/src/demangler_gnu_v2_24/README.txt Adds documentation about binutils source modifications for demangler build.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DemanglerGnu/build.gradle Adds Gradle build + zip task for native demangler sources/binaries.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DemanglerGnu/README.md Adds minimal module README.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DemanglerGnu/README.html Adds minimal HTML README.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DemanglerGnu/Module.manifest Declares licensing for shipped demangler binaries.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DemanglerGnu/LICENSE.txt Adds licensing inventory for DemanglerGnu module inputs/outputs.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/zlib/ZLIB.java Adds zlib compression/decompression helper used by DMG parsing.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/xattr/XattrConstants.java Adds xattr constant names used in HFS parsing.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/server/DmgServer.java Adds a DMG “server” process that reads commands and streams results.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/reader/DmgInputStream.java Adds InputStream wrapper for ReadableRandomAccessStream.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/reader/DmgInfoGenerator.java Adds info extraction for DMG filesystem entries.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/reader/DmgFileReader.java Adds DMG reader + filesystem traversal + decompression logic.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/hfsplus/AttributesFileParser.java Adds HFS+ attributes file extraction/parsing for decmpfs headers.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GSystemUtilities.java Adds small utility helpers for DMG support code.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GStringUtilities.java Adds hex/string conversion helpers for DMG support code.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GRandomAccessFile.java Adds buffered RandomAccessFile wrapper used by GByteProvider.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GFileUtilityMethods.java Adds temp-file utilities used for extracted DMG data streams.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GDataConverterLE.java Adds little-endian primitive conversion utilities.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GDataConverterBE.java Adds big-endian primitive conversion utilities.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GDataConverter.java Adds converter interface used by BE/LE implementations.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GConv.java Adds numeric conversion helpers that avoid sign extension.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/ghidra/GByteProvider.java Adds file-backed byte provider used by DMG parsing code.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/decmpfs/DecmpfsStates.java Adds decmpfs-related constants.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/decmpfs/DecmpfsHeader.java Adds decmpfs header parser used for compressed files.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/decmpfs/DecmpfsConstants.java Adds decmpfs magic/constants.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/decmpfs/DecmpfsCompressionTypes.java Adds decmpfs compression type constants.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/btree/BTreeUserDataRecord.java Adds B-tree record parsing class.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/btree/BTreeTypes.java Adds B-tree type constants.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/btree/BTreeRootNodeDescriptor.java Adds root node + node enumeration logic for B-tree parsing.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/btree/BTreeNodeRecord.java Adds parsing logic for B-tree node records (+ decmpfs header extraction).
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/btree/BTreeNodeKinds.java Adds node kind definitions for B-tree parsing.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/btree/BTreeNodeDescriptor.java Adds parsing for node descriptors + record tables.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/btree/BTreeMapRecord.java Adds bitmap-based node allocation record parsing.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/btree/BTreeHeaderRecordAttributes.java Adds header attribute bit masks.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/src/dmg/java/mobiledevices/dmg/btree/BTreeHeaderRecord.java Adds B-tree header record parsing.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/data/server_memory.cfg Adds DMG server runtime memory config.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/build.gradle Adds Gradle build for DMG jar from a custom sourceSet.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/README.md Adds minimal module README.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/README.html Adds minimal HTML README.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/Module.manifest Declares DMG jar licensing.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/GPL/DMG/LICENSE.txt Adds licensing inventory for DMG module dependencies.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/IDAPro/README.html Adds HTML documentation for IDA exporters.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/IDAPro/Python/7xx/plugins/xml_importer.py Adds IDA7 XML importer plugin script.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/IDAPro/Python/7xx/plugins/xml_exporter.py Adds IDA7 XML exporter plugin script.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/IDAPro/Python/7xx/loaders/xml_loader.py Adds IDA7 XML loader script.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/IDAPro/Python/7xx/README.html Adds IDA7 exporter/importer/loader documentation.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/IDAPro/Python/6xx/README.html Adds IDA6 exporter/loader documentation.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/src/main/resources/images/README.txt Adds skeleton extension resource directory note.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/src/main/java/skeleton/SkeletonPlugin.java Adds skeleton plugin example source.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/src/main/java/skeleton/SkeletonLoader.java Adds skeleton loader example source.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/src/main/java/skeleton/SkeletonFileSystem.java Adds skeleton filesystem example source.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/src/main/java/skeleton/SkeletonExporter.java Adds skeleton exporter example source.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/src/main/java/skeleton/SkeletonAnalyzer.java Adds skeleton analyzer example source.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/src/main/help/help/topics/skeleton/help.html Adds skeleton extension help topic.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/src/main/help/help/TOC_Source.xml Adds skeleton TOC scaffolding.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/os/win_x86_64/README.txt Adds skeleton extension OS-binary directory note (Windows).
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/os/mac_x86_64/README.txt Adds skeleton extension OS-binary directory note (macOS).
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/os/linux_x86_64/README.txt Adds skeleton extension OS-binary directory note (Linux).
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/lib/README.txt Adds skeleton extension libs directory note.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/ghidra_scripts/README.txt Adds skeleton extension scripts directory note.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/extension.properties Adds skeleton extension properties template.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/data/sleighArgs.txt Adds Sleigh compiler args placeholder.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/data/languages/skel.slaspec Adds skeleton language Sleigh spec.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/data/languages/skel.sinc Adds skeleton instruction include file.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/data/languages/skel.pspec Adds processor spec for skeleton language.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/data/languages/skel.opinion Adds commented example loader opinions.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/data/languages/skel.ldefs Adds commented-out language definition.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/data/languages/skel.cspec Adds compiler spec for skeleton language.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/data/buildLanguage.xml Adds Ant build for Sleigh language compilation.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/data/README.txt Adds skeleton extension data directory documentation.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/buildTemplate.gradle Adds extension build template for external Ghidra install.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Ghidra/Skeleton/README.md Adds minimal README for skeleton extension.
re-intro/auto-script-test/ghidra_11.4-2.2_PUBLIC/Extensions/Eclipse/GhidraSleighEditor/README.md Adds full documentation for Sleigh editor Eclipse plugin.
re-intro/auto-script-test/Autoscript.py Adds a simple DomainObject listener script for Ghidra.
re-intro/auto-script-test/.init Adds init script to install extensions, copy scripts, compile a sample binary, and deploy tool config.
re-intro/README.md Adds planning notes / TODO list / progress log for the reverse engineering intro module.
re-intro/1-rename-lesson/source.c Adds a small C program used in rename lesson challenge.
re-intro/1-rename-lesson/CheckXML.py Adds a SUID checker script that validates XML symbol changes and prints flag.
re-intro/1-rename-lesson/Autoscript.py Adds Ghidra autoscript to guide renaming and export an XML snapshot for validation.
re-intro/1-rename-lesson/.init Adds init script to install autoscripting assets and compute target addresses via nm.
re-intro/1-prob/check.py Adds a key-check script that prints flag when key matches expected.
re-intro/1-prob/challenge_files/2.c Adds a randomized-string C challenge variant for key construction.
re-intro/1-prob/challenge_files/1.c Adds a randomized-string C challenge variant for key construction.
re-intro/1-prob/challenge_files/0.c Adds a randomized-string C challenge variant for key construction.
re-intro/1-prob/README.md Adds an (empty) README placeholder.
re-intro/1-prob/.init Adds init script to compile a random C variant and write expected key/version.
re-intro/1-Rename-Lesson/source.c Adds a duplicate copy of rename lesson C program under different-cased directory.
re-intro/1-Rename-Lesson/CheckXML.py Adds a duplicate copy of rename lesson checker under different-cased directory.
re-intro/1-Rename-Lesson/Autoscript.py Adds a duplicate copy of rename lesson autoscript under different-cased directory.
re-intro/1-Rename-Lesson/.init Adds a duplicate copy of rename lesson init script under different-cased directory.
hello/module.yml Removes sample “hello” module definition.
hello/banana/banana Removes sample suid “banana” challenge script.
hello/banana/_2/.config Removes sample banana instance config.
hello/banana/_1/.config Removes sample banana instance config.
hello/banana/_0/.config Removes sample banana instance config.
hello/banana/README.md Removes sample banana README.
hello/banana/DESCRIPTION.md Removes sample banana description.
hello/apple/apple Removes sample suid “apple” challenge script.
hello/apple/README.md Removes sample apple README.
hello/apple/DESCRIPTION.md Removes sample apple description.
hello/DESCRIPTION.md Removes sample module description.
dojo.yml Renames dojo and changes module list to only include re-intro.
demo/module.yml Removes sample “demo” module definition.
demo/desktop-auto-launch/DESCRIPTION.md Removes demo challenge description.
demo/desktop-auto-launch/.init Removes demo auto-launch init script.
demo/DESCRIPTION.md Removes demo module description.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread dojo.yml
Comment on lines 1 to +8
id: example
name: Example Dojo
name: Introduction to Reverse Engineering
type: example
award:
emoji: 😀
emoji: 🔓
image: pwncollege/challenge-simple
modules:
- id: hello
- id: world
- id: demo
- id: re-intro

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title/intent suggests a case-only rename of a single lesson directory, but the diff shows a major dojo restructuring (module list rewired, sample modules removed) plus large third-party/vendor drops. If the intent really is only the case normalization, this PR should be split so the case rename is isolated from dojo/module and vendored Ghidra content changes.

Copilot uses AI. Check for mistakes.
Comment on lines +46 to +48
from (project.projectDir.toString() + "/" + srcVersion41 + "c") {
into "/" + srcVersion41
}

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The zip task source paths are missing a path separator before the c directory (they currently resolve to src/demangler_gnu_v2_41c / src/demangler_gnu_v2_24c). This will omit the C sources from the produced zip. Change these to srcVersionXX + \"/c\".

Copilot uses AI. Check for mistakes.
Comment on lines +60 to +62
from (project.projectDir.toString() + "/" + srcVersion24 + "c") {
into "/" + srcVersion24
}

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The zip task source paths are missing a path separator before the c directory (they currently resolve to src/demangler_gnu_v2_41c / src/demangler_gnu_v2_24c). This will omit the C sources from the produced zip. Change these to srcVersionXX + \"/c\".

Copilot uses AI. Check for mistakes.
* If the entry is actually a directory, then -1 is returned.
*/
public long getLength( FSEntry entry ) {
if ( entry != null & entry.isFile() ) {

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This uses bitwise & instead of short-circuiting logical &&. As written, entry.isFile() will always be evaluated (and it also reads oddly for a boolean guard). Replace & with &&.

Suggested change
if ( entry != null & entry.isFile() ) {
if ( entry != null && entry.isFile() ) {

Copilot uses AI. Check for mistakes.
Comment on lines +41 to +45
Inflater inflater = new Inflater( noWrap );

inflater.setInput( compressedBytes, offset, compressedBytes.length - offset );

int nDecompressed = inflater.inflate( tempDecompressedBytes );

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inflater/Deflater instances allocate native resources and should be released via end() (ideally in a finally block). In both decompress() and compress(), new Inflater/Deflater objects are created repeatedly without calling end(), which can leak native memory and destabilize long-running processes.

Copilot uses AI. Check for mistakes.
Comment on lines +245 to +251
input.skip( startDistance - 8 );//skip to the start of the zlib compressed file

File tempCompressedFile = GFileUtilityMethods.writeTemporaryFile( input, size - startDistance );
InputStream inputStream = new FileInputStream( tempCompressedFile );

ZLIB zlib = new ZLIB( );
ByteArrayOutputStream uncompressedByteStream = zlib.decompress( inputStream, expectedLength );

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method opens multiple InputStreams but never closes them (input and inputStream), which will leak file descriptors. Also, skip() and read() are used without checking the returned counts; skip() is not guaranteed to skip the full requested number of bytes. Use try-with-resources for all streams and a readFully/looped-skip approach to ensure the correct offsets are reached.

Copilot uses AI. Check for mistakes.
Comment on lines +61 to +69
result = subprocess.Popen(
['/challenge/CheckXML.py'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
)
out, err = result.communicate()
out = out.strip()

if out == "INCORRECT":

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The subprocess output from communicate() is typically bytes-like; comparing out to a Python string (\"INCORRECT\") will fail and can cause incorrect success reporting. Decode out (or run the process in text/universal-newlines mode) before stripping and comparing.

Copilot uses AI. Check for mistakes.
function_edited = False
param_edited = False

with open("/tmp/rename_challenge_completed.xml", "r", encoding="UTF-8") as file:

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This SUID-root checker trusts a fixed path in /tmp, which is attacker-controlled. A user can pre-create /tmp/rename_challenge_completed.xml with the expected lines and bypass the intended Ghidra renaming steps to read /flag. Use a root-owned, non-world-writable directory for the exported XML (or create a secure temp file with restrictive permissions), and validate ownership/permissions (and avoid following symlinks) before reading.

Copilot uses AI. Check for mistakes.
Comment on lines +40 to +42
if global_edited and function_edited and param_edited:
with open("/flag", "r") as flag:
print(flag.read())

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This SUID-root checker trusts a fixed path in /tmp, which is attacker-controlled. A user can pre-create /tmp/rename_challenge_completed.xml with the expected lines and bypass the intended Ghidra renaming steps to read /flag. Use a root-owned, non-world-writable directory for the exported XML (or create a secure temp file with restrictive permissions), and validate ownership/permissions (and avoid following symlinks) before reading.

Copilot uses AI. Check for mistakes.
char[] charArray = s.toCharArray();
for (char c : charArray) {
if (c == 11) {
encoded.append(c);// tab

Copilot AI Apr 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Character code 11 is vertical-tab (\\u000B), not tab (\\t is 9). Either change the condition to c == '\\t' if the intent is to preserve tabs, or update the comment to reflect that this is preserving vertical-tab.

Suggested change
encoded.append(c);// tab
encoded.append(c);// vertical-tab

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants