### Tested versions

4.2.stable (exported only)

### System information

Linux

### Issue description

This line is the bug:

https://github.com/godotengine/godot/blob/a311a4b162364d032b03ddf2a0e603ba40615ad7/core/io/file_access_pack.cpp#L330

`p_length` is the buffer length provided by the user, but this line does not check if the result is bigger than the length of the file.

As a result, when user tries to get a buffer that is bigger than the file (something like `file.get_buffer(99999999)`), `file.get_position()` may be bigger than `file.get_length()`.

It doesn't break Godot directly, but breaks any calculations based on `get_position()`. For example, it breaks relative seeking.

There is another variable `t_read` which is checked and should probably be used instead:

https://github.com/godotengine/godot/blob/a311a4b162364d032b03ddf2a0e603ba40615ad7/core/io/file_access_pack.cpp#L324-L328

### Steps to reproduce

Since this is a bug in `FileAccessPack`, it is only reproducible in **exported** projects (something like `FileAccessUnix` doesn't have this bug, so it can't be reproduced in the editor).

To reproduce, try to `file.get_buffer(99999999)` and then use `file.get_position()` for something.

### Minimal reproduction project (MRP)

I made a simple script that attempts to make a relative seeking and breaks because of this bug:

[FileAccessPackTest.zip](https://github.com/godotengine/godot/files/13615040/FileAccessPackTest.zip)
magic = f->get_32();
			if (magic == PACK_HEADER_MAGIC) {
#ifdef DEBUG_ENABLED
				print_verbose("PCK header found at the end of executable, loading from offset 0x" + String::num_int64(f->get_position() - 4, 16));
#endif
				pck_header_found = true;
			}
		}
	}
	if (!pck_header_found) {
		return false;
	}
	uint32_t version = f->get_32();
	uint32_t ver_major = f->get_32();
	uint32_t ver_minor = f->get_32();
	f->get_32(); 
	ERR_FAIL_COND_V_MSG(version != PACK_FORMAT_VERSION, false, "Pack version unsupported: " + itos(version) + ".");
	ERR_FAIL_COND_V_MSG(ver_major > VERSION_MAJOR || (ver_major == VERSION_MAJOR && ver_minor > VERSION_MINOR), false, "Pack created with a newer version of the engine: " + itos(ver_major) + "." + itos(ver_minor) + ".");
	uint32_t pack_flags = f->get_32();
	uint64_t file_base = f->get_64();
	bool enc_directory = (pack_flags & PACK_DIR_ENCRYPTED);
	for (int i = 0; i < 16; i++) {
		
		f->get_32();
	}
	int file_count = f->get_32();
	if (enc_directory) {
		Ref<FileAccessEncrypted> fae;
		fae.instantiate();
		ERR_FAIL_COND_V_MSG(fae.is_null(), false, "Can't open encrypted pack directory.");