| ceed-jit-tools.c (0d15ed0cd6bf1daa006b0d66d8e2856716d6576d) | ceed-jit-tools.c (6e25802e8a36deff9cd8f487fe0f213843aae78f) |
|---|---|
| 1// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and other CEED contributors. 2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3// 4// SPDX-License-Identifier: BSD-2-Clause 5// 6// This file is part of CEED: http://github.com/ceed 7 8#include <ceed-impl.h> --- 83 unchanged lines hidden (view full) --- 92 if (first_dot != *normalized_source_file_path && strlen(first_dot) > 3) memcpy(keyword, &first_dot[-1], 4); 93 bool is_up_one = !strcmp(keyword, "/../"); 94 95 if (is_up_one) { 96 char *last_slash = &first_dot[-2]; 97 98 while (last_slash[0] != '/' && last_slash != *normalized_source_file_path) last_slash--; 99 CeedCheck(last_slash != *normalized_source_file_path, ceed, CEED_ERROR_MAJOR, "Malformed source path %s", source_file_path); | 1// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and other CEED contributors. 2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3// 4// SPDX-License-Identifier: BSD-2-Clause 5// 6// This file is part of CEED: http://github.com/ceed 7 8#include <ceed-impl.h> --- 83 unchanged lines hidden (view full) --- 92 if (first_dot != *normalized_source_file_path && strlen(first_dot) > 3) memcpy(keyword, &first_dot[-1], 4); 93 bool is_up_one = !strcmp(keyword, "/../"); 94 95 if (is_up_one) { 96 char *last_slash = &first_dot[-2]; 97 98 while (last_slash[0] != '/' && last_slash != *normalized_source_file_path) last_slash--; 99 CeedCheck(last_slash != *normalized_source_file_path, ceed, CEED_ERROR_MAJOR, "Malformed source path %s", source_file_path); |
| 100 for (CeedInt i = 0; first_dot[i - 1]; i++) last_slash[i] = first_dot[i + 2]; | 100 for (CeedInt i = 0; first_dot[i + 1]; i++) last_slash[i] = first_dot[i + 2]; |
| 101 search_from = last_slash; 102 } 103 } 104 first_dot = strchr(search_from, '.'); 105 } 106 return CEED_ERROR_SUCCESS; 107} 108 --- 312 unchanged lines hidden --- | 101 search_from = last_slash; 102 } 103 } 104 first_dot = strchr(search_from, '.'); 105 } 106 return CEED_ERROR_SUCCESS; 107} 108 --- 312 unchanged lines hidden --- |