Skip to content

Commit a8858e3

Browse files
committed
Merge branch 'fz-dev' into dev
2 parents 120b5d7 + b7a6d18 commit a8858e3

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

lib/nfc/nfc_device.c

+1
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ bool nfc_device_load_mifare_ul_data(FlipperFormat* file, NfcDevice* dev) {
195195
}
196196
data->data_size = pages_total * 4;
197197
data->data_read = pages_read * 4;
198+
if(data->data_size > MF_UL_MAX_DUMP_SIZE || data->data_read > MF_UL_MAX_DUMP_SIZE) break;
198199
bool pages_parsed = true;
199200
for(uint16_t i = 0; i < pages_total; i++) {
200201
string_printf(temp_str, "Page %d", i);

scripts/get_env.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ def parse_args():
2020
parser = argparse.ArgumentParser()
2121
parser.add_argument("--event_file", help="Current GitHub event file", required=True)
2222
parser.add_argument(
23-
"--is_pull", help="Is it Pull Request", default=False, action="store_true"
23+
"--type",
24+
help="Event file type",
25+
required=True,
26+
choices=["pull", "tag", "other"],
2427
)
2528
args = parser.parse_args()
2629
return args
@@ -38,13 +41,17 @@ def get_commit_json(event):
3841
def get_details(event, args):
3942
data = {}
4043
current_time = datetime.datetime.utcnow().date()
41-
if args.is_pull:
44+
if args.type == "pull":
4245
commit_json = get_commit_json(event)
4346
data["commit_comment"] = shlex.quote(commit_json[-1]["commit"]["message"])
4447
data["commit_hash"] = commit_json[-1]["sha"]
4548
ref = event["pull_request"]["head"]["ref"]
4649
data["pull_id"] = event["pull_request"]["number"]
4750
data["pull_name"] = shlex.quote(event["pull_request"]["title"])
51+
elif args.type == "tag":
52+
data["commit_comment"] = shlex.quote(event["head_commit"]["message"])
53+
data["commit_hash"] = event["head_commit"]["id"]
54+
ref = event["ref"]
4855
else:
4956
data["commit_comment"] = shlex.quote(event["commits"][-1]["message"])
5057
data["commit_hash"] = event["commits"][-1]["id"]
@@ -78,7 +85,7 @@ def add_envs(data, env_file, args):
7885
add_env("BRANCH_NAME", data["branch_name"], env_file)
7986
add_env("DIST_SUFFIX", data["suffix"], env_file)
8087
add_env("WORKFLOW_BRANCH_OR_TAG", data["branch_name"], env_file)
81-
if args.is_pull:
88+
if args.type == "pull":
8289
add_env("PULL_ID", data["pull_id"], env_file)
8390
add_env("PULL_NAME", data["pull_name"], env_file)
8491

0 commit comments

Comments
 (0)