This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| TOKEN=$(jq -r '.claudeAiOauth.accessToken' ~/.claude/.credentials.json 2>/dev/null) | |
| if [ -z "$TOKEN" ] || [ "$TOKEN" = "null" ]; then | |
| echo '{"text": "CC: --", "tooltip": "Claude Code: no credentials", "class": "claude-error"}' | |
| exit 0 | |
| fi | |
| USAGE=$(curl -sf \ | |
| -H "Accept: application/json" \ | |
| -H "Authorization: Bearer $TOKEN" \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdlib.h> | |
| // Bug 1: off-by-one in the loop bound — writes past the end of buf[] | |
| // Bug 2: missing NULL check after malloc — dereferences a potentially NULL pointer | |
| int main() { | |
| int buf[10]; | |
| for (int i = 0; i <= 10; i++) | |
| buf[i] = i * 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| EXPECTED_SHA="74042739197c58a4791c1f67414c0d8956639ec2f2e935280872b83d4317be78" | |
| PATCHED_SHA="f098915988a2ac5a5747334147e4893bbca94eacd02bb36ee4c0e7d8f6df1c74" | |
| TARGET="${1:-$(readlink -f "$(which claude)")}" | |
| if [[ ! -f "$TARGET" ]]; then | |
| echo "Error: file not found: $TARGET" >&2 | |
| exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| EXPECTED_SHA="4e2b23dbf2f97918d5edc95ae1de03d230a66b94d5fa31a57cc673742ec6ae22" | |
| PATCHED_SHA="fcf070c6e28f5649578f5359b4d3d9dce27eaf6768bb3e0300072f0b13b11169" | |
| TARGET="${1:-$(readlink -f "$(which claude)")}" | |
| if [[ ! -f "$TARGET" ]]; then | |
| echo "Error: file not found: $TARGET" >&2 | |
| exit 1 |
OlderNewer