Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
3697471
Added clang format
nitishhsinghhh May 1, 2026
cdc482f
refactor: replace insecure strcpy with memcpy in ConversionResult
nitishhsinghhh May 1, 2026
bef2df6
refactor: replace insecure strcpy with memcpy in ConversionResult
nitishhsinghhh May 1, 2026
53f45e0
All three OS build
nitishhsinghhh May 2, 2026
2717763
Merge branch 'main' of https://github.com/nitishhsinghhh/case-convers…
nitishhsinghhh May 2, 2026
31299e8
style: fix clang-format violations in ProcessStringDLL
nitishhsinghhh May 2, 2026
b56e3d0
feat(infra): add load-balanced orchestration with Nginx and 4 backend…
nitishhsinghhh May 3, 2026
2cd2e0c
ci: add automated GitHub Actions cache cleanup workflow
nitishhsinghhh May 3, 2026
5f1ca0d
ci: add automated GitHub Actions cache cleanup workflow
nitishhsinghhh May 3, 2026
3a8ebd7
ci: add automated GitHub Actions cache cleanup workflow
nitishhsinghhh May 3, 2026
3105952
Resolves CodeQL missing-workflow-permissions alert by defining an exp…
nitishhsinghhh May 3, 2026
457bd6c
ci: finalize cache cleanup workflow with correct permissions and toke…
nitishhsinghhh May 4, 2026
4d6c763
ci: finalize cache cleanup workflow
nitishhsinghhh May 4, 2026
d3456b2
ci: finalize cache cleanup workflow
nitishhsinghhh May 4, 2026
a3f3261
ci: finalize cache cleanup workflow
nitishhsinghhh May 4, 2026
d4de837
Merge branch 'main' into fix/formatting-engine
nitishhsinghhh May 4, 2026
b1d7aa8
Minor DLL changes
nitishhsinghhh May 4, 2026
8a64312
Resolved merge conflicts for handover
nitishhsinghhh May 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cleanup-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ name: Cache Cleanup

on:
schedule:
- cron: '0 0 * * *' # Daily at midnight UTC
- cron: '30 18 * * *' # Midnight IST (18:30 UTC)
workflow_dispatch: {}

permissions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ extern "C" {
#endif

/**
* @brief COnverts input string based on choice and returns a newly allocated
* @brief Converts input string based on choice and returns a newly allocated
* C-string.
*
* @param input C-string input.
Expand Down
12 changes: 8 additions & 4 deletions backend/CaseConversionAPI/CppLib/src/ProcessStringDLL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ static const char *safeError(const char *msg) {
// Conversion Mapping (Internal - C++ only)
//===================================================================

static bool mapConversionType(ConversionChoice choice, ConversionType &type) {
static bool mapConversionType(ConversionChoice choice,
ConversionType &type) noexcept {
switch (choice) {
case ConversionChoice::Alternating:
type = ConversionType::Alternating;
Expand Down Expand Up @@ -133,8 +134,9 @@ extern "C" {
API const char *processStringDLL(const char *input, int choiceInt,
const char *traceId) {
try {
if (!input)
if (!input) {
return safeError("ERROR_NULL_INPUT");
}

size_t inputLength = std::strlen(input);
if (inputLength > MAX_INPUT_SIZE) {
Expand Down Expand Up @@ -162,14 +164,16 @@ API const char *processStringDLL(const char *input, int choiceInt,
ConversionResult result = client.execute(std::string(input));
const char *rawPtr = result.get_c_str();

if (!rawPtr)
if (!rawPtr) {
return safeError("ERROR_ENGINE_RETURNED_NULL");
}

size_t resLen = std::strlen(rawPtr);
char *output = static_cast<char *>(std::malloc(resLen + 1));

if (!output)
if (!output) {
return safeError("FATAL_ALLOCATION_FAILURE");
}

std::memcpy(output, rawPtr, resLen + 1);

Expand Down
Loading