Skip to content

Some escape_mapper suggestions#1

Merged
elsloo merged 1 commit intoelsloo:add_escape_mapperfrom
bneradt:review_add_escape_mapper
Apr 18, 2022
Merged

Some escape_mapper suggestions#1
elsloo merged 1 commit intoelsloo:add_escape_mapperfrom
bneradt:review_add_escape_mapper

Conversation

@bneradt
Copy link
Copy Markdown

@bneradt bneradt commented Apr 12, 2022

A few tweaks to escape_mapper:

  1. Add the binary to gitignore
  2. Add a NOTE requesting changies to LogUtils.cc codes_to_escape to
    update the tool.
  3. Convert escape_mapper to C++.

1. Add the binary to gitignore
2. Add a NOTE requesting changies to LogUtils.cc codes_to_escape to
   update the tool.
3. Convert escape_mapper to C++.
Comment on lines +59 to +62
// add_mapping performs a logical or on the entries, so the above 0xFF values
// will persist.
for (auto char_to_escape : to_escape) {
add_mapping(&escape_codes[0], char_to_escape);
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I switched the file to C++ to make some of these loops a bit easier to process.

@elsloo elsloo merged commit abc38cf into elsloo:add_escape_mapper Apr 18, 2022
@bneradt bneradt deleted the review_add_escape_mapper branch March 29, 2023 19:38
elsloo pushed a commit that referenced this pull request Jan 9, 2024
Fix the `make check` failure with the following output by changing to
.gold which meets our license exclusion regex rules:

 Printing headers for text files without a valid license header...

=====================================================
== File: ./tests/gold_tests/records/gold/renamed_records.out
=====================================================
```
┌■ 8 Renamed records:
└┬──» #1 : proxy.config.output.logfile -> proxy.config.output.logfile.name
 ├──» apache#2 : proxy.config.exec_thread.autoconfig -> proxy.config.exec_thread.autoconfig.enabled
 ├──» apache#3 : proxy.config.hostdb -> proxy.config.hostdb.enabled
 ├──» apache#4 : proxy.config.tunnel.prewarm -> proxy.config.tunnel.prewarm.enabled
 ├──» apache#5 : proxy.config.ssl.origin_session_cache -> proxy.config.ssl.origin_session_cache.enabled
 ├──» apache#6 : proxy.config.ssl.session_cache -> proxy.config.ssl.session_cache.value
 ├──» apache#7 : proxy.config.ssl.TLSv1_3 -> proxy.config.ssl.TLSv1_3.enabled
 └──» apache#8 : proxy.config.ssl.client.TLSv1_3 -> proxy.config.ssl.client.TLSv1_3.enabled
```
elsloo pushed a commit that referenced this pull request Jan 9, 2024
CID 1508856: Logically dead code apache#10432

In access_control.cc:

```cpp
197    size_t equalsign = kvp.find(_tokenConfig.kvDelimiter);
   	cond_cannot_single: Condition 18446744073709551615UL == equalsign, taking false branch. Now the value of equalsign cannot be equal to -1.
198    if (kvp.npos == equalsign) {
199      ERROR_OUT("invalid key-value-pair, missing key-value delimiter");
200      return _state = INVALID_SYNTAX;
201    }
202    StringView key   = kvp.substr(0, equalsign);
   	cannot_single: At condition equalsign != 18446744073709551615UL, the value of equalsign cannot be equal to -1.
   	dead_error_condition: The condition equalsign != 18446744073709551615UL must be true.

CID 1508856 (#1 of 1): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: <temporary>.basic_string_vi....
203    StringView value = equalsign != kvp.npos ? kvp.substr(equalsign + 1) : "";
```
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